In the definition in the .cpp file, remove the static :
// No static here (it is not allowed) std::string neighborAtt::intToStr(int number) { ... }
As long as you have the static in the header file, the compiler knows it as a method of a static class, so you should not specify it in the definition in the source file and you cannot specify it.
In C ++ 03, storage class specifiers are the auto , register , static , extern and mutable keywords, which tell the compiler how the data is stored. If you see an error message referencing storage class specifiers, you can be sure to refer to one of these keywords.
In C ++ 11, the auto keyword has a different meaning (it is no longer a storage class specifier).
Adam rosenfield
source share