xxx.h
int FindAmb(CString SrcStr);
xxx.cpp
int FindAmb(CString SrcStr)
{
...
}
e:\vcpractice\wordseg1.25\ambiguity.cpp(5) : error C2065: CString : undeclared identifier
e:\vcpractice\wordseg1.25\ambiguity.cpp(5) : error C2146: syntax error : missing ) before identifier SrcStr
e:\vcpractice\wordseg1.25\ambiguity.cpp(5) : error C2059: syntax error : )
{
在你的 xxx.cpp 引入“stdafx.h”
//xxx.cpp
#include "stdafx.h"
int FindAmb(CString SrcStr)
{
...
}
应该是少调用头文件了。