我已經包含了QMutex頭文件並使用它,如下所示。但我得到以下錯誤:QMutex爲何未知?
error C2146: syntax error : missing > ';' before identifier > '_RecorderParamsMutex'
error C4430: missing type specifier - int assumed. > Note: C++ does not support default-int
error C4430: missing type specifier -> int assumed. Note: C++ does not > support default-int
#ifndef RECORDERinterface_h
#define RECORDERinterface_h
#include "qstring.h"
#include "ccc.h"
#include "ddd.h"
#include <qmutex.h>
#include "eee.h"
using namespace Common; //for aaaaa
class RecorderInterface{
//the implemented recorders are my friends, the may access all my private stuff :)
friend class A;
friend class B;
public:
RecorderInterface();
bool setParam(RecorderPrintParam *up);
private:
QMutex _RecorderParamsMutex;
};
#endif
不回答你的問題,但像_RecorderParamsMutex這樣的名字(以下劃線和大寫字母開頭的名字)保留給C++實現 - 你不能在你自己的代碼中創建這樣的名字。 – 2010-01-20 12:47:07
好的謝謝,你有一個鏈接到該標準?所以我可以進一步看看這個命名標準。 – Christoferw
該標準不在線提供 - 您必須爲此付費。有各種各樣的草稿敲門雖然。 – 2010-01-20 12:49:39