自己定義的 #define CMD_ID_SERVER 1000
然后在proto文件里定義了
enum CMD_ID
{
CMD_ID_SERVER = 20000;
}
得到下面的錯(cuò)誤
Error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 46
Error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 46
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 47
Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 47
Error 20 error C2447: '{' : missing function header (old-style formal list?) e:\zc\test\doloio\package\hello\hello.pb.h 51
Error 27 error C2447: '{' : missing function header (old-style formal list?) e:\zc\test\doloio\package\hello\hello.pb.h 431
Error 17 error C2440: 'initializing' : cannot convert from 'const int' to 'const std::string &' e:\zc\test\doloio\package\hello\hello.pb.h 51
。。。。。。。。。。
------------------------------------------
其實(shí)根據(jù)錯(cuò)誤信息應(yīng)該很容易發(fā)現(xiàn)錯(cuò)誤所在,但因?yàn)槲倚募保瑳]能靜下心來(lái)看錯(cuò)誤信息以至浪費(fèi)了更多的時(shí)間和精力于無(wú)謂的猜測(cè)試驗(yàn)