同一个类的相同写法的函数为什么在调用时,有的不能用出错啊
如:class CAddressListDataSet : public CDataSet
{
public: int GetID();
CString GetName();
CString GetMobile();
BOOL LoadData(int ParID);
BOOL LoadByAddressListID(int AddressListID);
BOOL LoadDataByDepartmentID(int DepartmentID);
CAddressListDataSet();
virtual ~CAddressListDataSet();};
类CAddressListDataSet中的GetName()方法在
...
while(!m_dsALDInfo.IsEOF())
{
CString temp;
temp.Format("%d", m_dsALDInfo.GetID());
m_addresslist.InsertItem (nRowCount,temp);
temp.Format("%s", m_dsALDInfo.GetName());
m_addresslist.SetItemText(nRowCount,1,temp); temp.Format("%s", m_dsALDInfo.GetMobile());
m_addresslist.SetItemText(nRowCount,2,temp);
m_dsALDInfo.MoveNext();
}
m_dsALDInfo.Close();
}
...
能成功调用,而m_dsALDInfo.GetMobile()就不能调用啊
如:class CAddressListDataSet : public CDataSet
{
public: int GetID();
CString GetName();
CString GetMobile();
BOOL LoadData(int ParID);
BOOL LoadByAddressListID(int AddressListID);
BOOL LoadDataByDepartmentID(int DepartmentID);
CAddressListDataSet();
virtual ~CAddressListDataSet();};
类CAddressListDataSet中的GetName()方法在
...
while(!m_dsALDInfo.IsEOF())
{
CString temp;
temp.Format("%d", m_dsALDInfo.GetID());
m_addresslist.InsertItem (nRowCount,temp);
temp.Format("%s", m_dsALDInfo.GetName());
m_addresslist.SetItemText(nRowCount,1,temp); temp.Format("%s", m_dsALDInfo.GetMobile());
m_addresslist.SetItemText(nRowCount,2,temp);
m_dsALDInfo.MoveNext();
}
m_dsALDInfo.Close();
}
...
能成功调用,而m_dsALDInfo.GetMobile()就不能调用啊
解决方案 »
- 想要一个ini文件解析类,可以解析ini文件,解析完成后,知道该ini文件有多少section,每个section下面有多少key,value
- 如何判断当前应用程序是使用的光盘还是硬盘,或者是使用的光驱或者硬盘
- 求思路:在视图中高亮鼠标经过的图形
- 如何在VC++6.0中调用VBScript?
- 建立与数据库的连接问题???ado连接sql server
- 谁能给我一个样条拟合或B样条拟合的算例?
- 关于LoadString的问题
- 有一字符串“abc我aa们dd1你是2jl”,如何统计其中汉字的个数?
- 为什么在拨号上网时连接速度有50kb左右,而下载速度一般不超过5kb???
- 怎样在Windows98读取硬盘序列号?
- vc++6.0中,double型数据如何取其精度(取前2位或3位)
- 急:在MFC里如何用ADO操作MYSQL?
{
return GetAsString("Name");
}
CString CAddressListDataSet::GetMobile()
{
return GetAsString("Mobile");
}
他们的调用方法是一样的啊