我对VC不太熟。以前有一个用C写的项目,现在想将一些C++写的代码整合进去。我直接加入工程后出现编译错误:
E:\Monitor_test\comm.h(14) : error C2061: syntax error : identifier 'Comm'
E:\Monitor_test\comm.h(14) : error C2059: syntax error : ';'
E:\Monitor_test\comm.h(15) : error C2449: found '{' at file scope (missing function header?)
E:\Monitor_test\comm.h(28) : error C2059: syntax error : '}'请问各位大虾。如何改才能工作量最小。
E:\Monitor_test\comm.h(14) : error C2061: syntax error : identifier 'Comm'
E:\Monitor_test\comm.h(14) : error C2059: syntax error : ';'
E:\Monitor_test\comm.h(15) : error C2449: found '{' at file scope (missing function header?)
E:\Monitor_test\comm.h(28) : error C2059: syntax error : '}'请问各位大虾。如何改才能工作量最小。
应该直接添加就可以了哦Comm是什么东东?
其中xxx.h中定义的类编译器不认:
class xxx
{
public:
BOOL a(char *c);
void b();
};报错:
E:\Monitor_test\xxx.h(14) : error C2061: syntax error : identifier 'xxx'
E:\Monitor_test\xxx.h(14) : error C2059: syntax error : ';'
E:\Monitor_test\xxx.h(15) : error C2449: found '{' at file scope (missing function header?)
E:\Monitor_test\xxx.h(28) : error C2059: syntax error : '}'原来工程中的文件都是.c。我新加入的是.h和.cpp,楼上有人说该后缀名,是把原来的.c改成.cpp吗,这样不对吧?