Re: const assignment issue
Re: const assignment issue
- Subject: Re: const assignment issue
- From: Luigi Castelli <email@hidden>
- Date: Fri, 8 Dec 2006 10:58:53 -0800 (PST)
>
> Using XCode 2.4.1 I find that error when the code is
> in a .c file,
> but no error when it is in a .cp file.
>
Exactly, I get the same thing.
If I make the file into a .cp then X-code reports no
error.
That's weird, isn' it? Or am I missing something
obvious?
Are C and C++ behaving differently in regards to
consts ?
Is there any way that it could be told X-code not to
complain even if the declaration is made in a .c file
?
Any help or suggestion highly appreciated.
- Luigi
--- David A Rowland <email@hidden> wrote:
> At 8:12 PM -0800 12/7/06, Luigi Castelli wrote:
> >here is the code fragment...
> >
> >extern const long kTableSize = 8192;
> >extern const long kTableMask = kTableSize - 1;
> >
> >The error that I get from X-code is:
> >error: initializer element is not constant
> >
> >- Luigi
> >
------------------------------------------------------------
THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION. ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED. IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT email@hidden AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.
------------------------------------------------------------
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden