From my point of view, static functions are the name distorted by the name of the file in which they are defined, so when you include file.h in main.cpp, GetInteger () gets mangled with main.cpp, although you defined GetInteger () in the .cpp file, but since it is static, it is also distorted, and the linker cannot find the definition of GetInteger (), since no function by this name exists.
I believe that the lesson learned does not declare static functions in the header file because they are not intended for part of the interface.
HBY4PI May 30 '12 at 8:47 2012-05-30 08:47
source share