RE: [Dev-C++] #DEFINE versus cont variables in array inicializations
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-05-31 00:52:49
|
I assume gcc is a bit naughty. However, as long as I know about the problem, it does allow me to write working code that is portable to other compilers. /Per W On Sat, 31 May 2003, Ioannis Vranos wrote: > > -----Original Message----- > > From: Ioannis Vranos [mailto:iv...@em...] > > Sent: Saturday, May 31, 2003 3:13 AM > > To: Dev-C++ Mailing List (dev...@li...) > > Subject: RE: [Dev-C++] #DEFINE versus cont variables in array > > inicializations > > > > > > > -----Original Message----- > > > From: Per Westermark [mailto:pw...@ia...] > > > Sent: Saturday, May 31, 2003 6:38 AM > > > To: Ioannis Vranos > > > Cc: Dev-C++ Mailing List > > > Subject: RE: [Dev-C++] #DEFINE versus cont variables in array > > > inicializations > > > > > > > > > See below > > > > > > > > > If you know that you need to take the address in another file, then > > > declare it as: > > > extern const int SIZE = 7; > > > > > > I am sorry to tell you this, but this is *nonsense*. The C++ > > standard doesn't require to define it like this. > > > > I just checked it and it seems you are right. Don't know why yet. > > > However does the above style make the compiler to give it an address? That > would be very strange. I shall check the standard now. > > > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL 1: http://run.to/noicys > * Alternative URL 2: http://www.noicys.cjb.net > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |