Hello all! Maybe I did not understand something fundamental about namespaces, because I cannot make out the following behaviour.
Please consider the following code snippet (it is a simplified version of what I want to do, in order to reproduce the error, actually the namespace declaration is in a separate header file). // ================================================== // Begin C++ code, file TTest.cc namespace TTest { int value; }; TTest::value = 1; // End C++ code // ================================================== When compiling this file with $ g++ -c TTest.cc I receive the error message "TTest.cc:9: error: expected constructor, destructor, or type \ conversion before ‘=’ token" So where am I wrong in thinking, that TTest::value is an entity, I can assign values to outside the namespace? Thank you in advance for explanations! Peter _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus