This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Static Const


Hi Thomas,

You cannot initialize non-integral static data members inside the class.

Try this:

// .h file
class RemoteManager:public Runnable{
   ...
public:
   ...
-->  static const char MANAGEMENT_INTERFACE[];
   ...
 };

// .cpp file
const char RemoteManager::MANAGEMENT_INTERFACE[] = "127.0.0.1";

--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]