首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

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

2012-02-17 
紧急求助:Linux下C++编译,不识别类成员的问题错误信息:requestformember`testin`this ,whichisofnon-class

紧急求助: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;

热点排行