读书人

:Linux下C++编译不识别类成员的有关

发布时间: 2012-02-17 17:50:42 作者: rapoo

紧急求助:Linux下C++编译,不识别类成员的问题
错误信息:request for member `test ' in `this ', which is of non-class type `Dboc* const '

程序大概是这样的:

dboc.h里面
class Dboc
{
public:
Dboc();
~Dboc();
Dboc(string username, string password, string dburl);
       ……
private:
int test;
  ……
};

dboc.cpp里面:
#include "dboc.h "

Dboc::Dboc()
{
this.test = 1;
  ……


由于是刚开始学在LINUX下C++编程,望各位大狭赐教!万分感激!!

[解决办法]
this-> test = 1;
[解决办法]
this.test = 1;
==》
this-> test = 1;

读书人网 >C语言

热点推荐