我正在尝试在每个 CClient 类中创建一个 CBuffer 成员,如下所示:
#ifndef CCLI_INC
#define CCLI_INC
#include "CBuffer.h"
#include "main.h"
class CClient
{
private:
CBuffer *m_buffer;
public:
CClient();
};
但是这段代码给了我
error C2143: syntax error : missing ';' before '*'
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
虽然我已经包含了 cbuffer.h 头文件,但它给出了这个奇怪的错误..