qt-interest@trolltech.com
[Top] [All Lists]

Re: Global const in C++

Subject: Re: Global const in C++
From: Oleg Romanenko
Date: Tue, 07 Nov 2006 02:17:47 +0400
Bjoern Schliessmann wrote:
Oleg Romanenko wrote:


Hello, I'm a bit off from Qt, but how can I declare and use a
global const in my program?


What's wrong about

const int myConstInt = 4;

...?

I need to use this global variable in all building blocks (cpp's) in my program. When I try to use extern in each CPP file -> I get linker error.


Regards,


Björn


--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>