typedef struct _student
{
CString strName;
CString strAge;
CString strSex;
CString strStart;
CString strEnd;
CString strGrade;
}Infoite;class CDBControl
{
public: CDBControl();
virtual ~CDBControl();
void DBConnection();
void ExeQuery(CString strCommand);
void AddItem_member(Infoite oInstru);
void GetItem_menber(Infoite oInstru);public:
_ConnectionPtr m_pConnection;
_RecordsetPtr m_pRecordset;
};
大家帮我看一下上面那个结构体的定义,有问题吗?为什么我在.h里面定义的这个结构体,在.CPP里面使用会出现
E:\TANGLX\MemberOri\DBControl.cpp(37) : error C2511: 'GetItem_menber' : overloaded member function 'void (struct CDBControl::_student &)' not found in 'CDBControl'
e:\tanglx\memberori\dbcontrol.h(15) : see declaration of 'CDBControl'
这个错误?
{
CString strName;
CString strAge;
CString strSex;
CString strStart;
CString strEnd;
CString strGrade;
}Infoite;class CDBControl
{
public: CDBControl();
virtual ~CDBControl();
void DBConnection();
void ExeQuery(CString strCommand);
void AddItem_member(Infoite oInstru);
void GetItem_menber(Infoite oInstru);public:
_ConnectionPtr m_pConnection;
_RecordsetPtr m_pRecordset;
};
大家帮我看一下上面那个结构体的定义,有问题吗?为什么我在.h里面定义的这个结构体,在.CPP里面使用会出现
E:\TANGLX\MemberOri\DBControl.cpp(37) : error C2511: 'GetItem_menber' : overloaded member function 'void (struct CDBControl::_student &)' not found in 'CDBControl'
e:\tanglx\memberori\dbcontrol.h(15) : see declaration of 'CDBControl'
这个错误?
顺便咨询大家个问题我的一个sln下面有多个工程,我想加一个宏进去
不想每个工程都加,太多了,怎么可以统一设置下呢?
根据提示,楼主可能忘了加上CDBControl::了
void GetItem_menber (Infoite oInstru);
在.cpp文件中:
void CDBControl::GetItem_menber (Infoite oInstru)
{
}