Hello, I can't add new class.
It is in /src/test.h:
class Test
{
public:
void info(void);
int i;
}
It is in /src/test.cpp:
#include <test.h>
void Test::info(void)
{
i = 10;
}
Next I add "/src/test.cpp" to CMakeLists.txt
When I compile I have error:
~/mineserver$ make all
[ 1%] Building CXX object CMakeFiles/mineserver.dir/src/test.cpp.o
/home/akahito/mineserver/src/test.h:1: error: new types may not be defined in a return type
/home/akahito/mineserver/src/test.h:1: note: (perhaps a semicolon is missing after the definition of ‘Test’)
/home/akahito/mineserver/src/test.cpp:3: error: two or more data types in declaration of ‘info’
make[2]: *** [CMakeFiles/mineserver.dir/src/test.cpp.o] Error 1
make[1]: *** [CMakeFiles/mineserver.dir/all] Error 2
make: *** [all] Error 2
Can you say, what I do wrong?