c++ - Initializing Constant Static Array In Header File -


I just found out that the following is not valid.

  // header file class test (constant static four array [] = {'1', '2', '3'};}  

Where is the best place to start it?

Thank you in advance;

< P> The best place to be in a source file

  // header file class test {constant static four array [];}; // source file const char test :: array [] = { '1', '2', '3'};  

You can initialize the integer type in class declaration like you All other types have to be started outside the class manifesto, and only once.


Comments