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

Re: static const QString

Subject: Re: static const QString
From: Malte Witt
Date: Wed, 16 Nov 2005 10:25:25 +0100
Hi,

> Note that only integers? can be given a value directly in the class 
> definition, such as:
> 
> static const int MY_INT = 5;

which works with g++ but not with i.e. msvc and others ... So you better 
don't use it if you want to write platform independent code. Initialize 
the "constant" outside the class declaration as I mentioned in my last 
post :-)

Greetings,

Malte
 

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