Re: why does this code generate a[n incorrect] error?
Re: why does this code generate a[n incorrect] error?
- Subject: Re: why does this code generate a[n incorrect] error?
- From: Markian Hlynka <email@hidden>
- Date: Wed, 16 Jun 2004 16:03:45 -0600
I'm ccing this to the list(s) because it clears up my earlier question.
On Jun 16, 2004, at 15:52, Dima Brodsky wrote:
It should be:
int STOP = 0; // should be initialized
sorry, I should have specified. the int _was initialized elsewhere. In
another file.
the extern key word tells the compiler that the variable is
instantiated
somewhere else and not to instantiated here. In general you would
want to
do is in some file define the global variable X and then in a header
file
that all source files include extern define the variable X.
that's actually what I did. But, my error was that I wrote "EQUAL"
instead of EQUALS
#define EQUALS ==
if(STOP EQUAL 1)
{
do something
}
so, yes, you're right, but unfortunately this is what i've done, and I
still don't understand the weird compiler error. Why does it point to
STOP, which is correctly declared extern, and is declared in another
file, when it should point to EQUAL?
Markian
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.