c ++头文件错误?

时间:2011-10-04 15:53:57

标签: visual-c++

(Visual Studio c ++ 6.0)

.\app.h(69) : error C2146: syntax error : missing ';' before identifier 'IsProcessRunning'
.\app.h(69) : error C2501: 'DWORD' : missing storage-class or type specifiers
.\app.h(69) : error C2061: syntax error : identifier 'LPCTSTR'
.\app.h(70) : error C2061: syntax error : identifier 'LPCTSTR'

不确定为什么会出现这些错误?为什么语法错误? DWORD和LPCTSRT被认可。

    virtual BOOLEAN DoNew( void );

    DWORD IsProcessRunning(LPCTSTR procname);
    bool TerminateProcess(LPCTSTR procname);

    void UpdateControllerStatus( void );

2 个答案:

答案 0 :(得分:3)

根据错误,DWORD无法识别。你确定要包含windows.h吗?

答案 1 :(得分:-1)

将#include添加到代码的开头......