我需要为基于 Zinc 的 Flash 应用程序重构一个 .dll。
在将一个类从 master 复制并粘贴到分支后,我遇到了一些奇怪的编译错误:
GameInfo.h(15): error C2146: syntax error : missing ';' before identifier 'm_wsVersion'
GameInfo.h(15): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
GameInfo.h(15): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
寻址代码:
// removed the comments
#include "stdafx.h"
#include <string.h>
class GameInfo {
public:
UINT m_uiGameId;
wstring m_wsVersion; // Line 15
UINT m_uiCheckSum;
wstring m_wsFilePath; // Same error report as on line 15
public:
static BOOL createFromFile(wstring path, GameInfo &target); // error "error C2061: syntax error : identifier 'wstring'" thrown
};
我使用 Visual Studio 2010,在 IDE 本身中一切正常,没有语法错误或类似的错误。如前所述,我没有接触代码,标题似乎很好。
有谁知道这个错误怎么办?