The code is fine, however it needs a C++11 compiler.
What do you use ?
I solved it - it was just a typo by me done in a header file.
It turned out that I had included a class definition file before the "static..." and the class definition was not terminated by a ;
I'm using g++ with -std=c++11
Thanks for replying.
A variable can only be declared as static (in the header). You need to define it afterwards (without static) and then you may initialize it.
[EDIT]
This applies for the global scope only. In the local scope it is defined as well.
Last edited on