Re: Declared or not?
Re: Declared or not?
- Subject: Re: Declared or not?
- From: "David W. Halliday" <email@hidden>
- Date: Wed, 26 Mar 2003 10:16:23 -0600
- Organization: TNRCC
Peter Karlsson wrote:
Dear list!
My interface file looks like this:
----------
@interface DataManager : NSObject
{
@private
Byte **partmidi_ptr;
}
...
@end
----------
And my implementation file looks like this:
----------
...
----------
But this line (located in another file) generates an error,
`partmidi_ptr' undeclared, why? I declared it in my interface file...
if((partmidi_ptr = malloc(sizeof(*partmidi_ptr) * 1024)) == NULL)
Peter
First, you don't state whether this other file includes
"DataManager.h". If it doesn't, then you /certainly/ haven't declared
`partmidi_ptr' (so far as we can see in what you've shown us). However,
even if you have included "DataManager.h", the only `partmidi_ptr' you
/have/ declared (that we can see) is an /instance/ variable that is only
accessible within an instance of the "DataManager" class, or an instance
of a subclass thereof (or via a data structure view of such).
By the way, what programming languages have you had experience with?
(This will help us tune our terminology, and provide a basis for
analogies that should help us help you.)
I hope this helps.
David Halliday
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.