| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 766 人关注过本帖
标题:编译出错怎么改,高手指点
只看楼主 加入收藏
lisypro
Rank: 4
等 级:业余侠客
威 望:3
帖 子:695
专家分:216
注 册:2005-9-25
结帖率:33.33%
收藏
 问题点数:0 回复次数:1 
编译出错怎么改,高手指点
编译出错怎么改,高手指点
void CDAOView::OnStuffView()
{
// TODO: Add your command handler code here
//设置当前操作的数据库表名称
m_strTableName=_T("物品");
//监督DAO数据库对象的有效性,并在记录集对象打开时关闭记录集
if(!m_pDatabase->IsOpen())return;
if(!m_pRecordset)return;
if(m_pRecordset->IsOpen())m_pRecordset->Close();
//清除所有视图上的显示
CListCtrl & ctlList=(CListCtrl&)GetListCtrl();
EraseList();
//取表的结构信息
CDaoFieldInfo fieldInfo;
int nFields;
CDaoTableDef td(m_pDatabase);
try
{
td.Open(m_strTableName);
nFields=td.GetFieldCount();
for(int j=0;jReportError();
e->Delete();
return;
}
td.Close();
//取表的数据
int nItem=0;
try
{
CString strSelect(_T("Select * From ["));
strSelect+=m_strTableName;
strSelect += _T("]");
m_pRecordset->Open(dbOpenDynaset,strSelect);
while(!m_pRecordset->IsEOF())
{
COleVariant var;
var=m_pRecordset->GetFieldValue(0);
ctlList.InsertItem(nItem,CCrack::strVARIANT(var));
for(int i=0;iGetFieldValue(i);
ctlList.SetItemText(nItem,i,CCrack::strVARIANT(var));
}
nItem++;
m_pRecordset->MoveNext();
}
}
catch(CDaoException *e)
{
e->ReportError();
e->Delete();
return;
}
//显示信息
CString strRecCount;
strRecCount.Format(_T("显示了%d条记录。"),nItem);
UpdateWindow();
if(nItem>=MAXRECORDS) MessageBox(strRecCount);
((CFrameWnd *)AfxGetMainWnd())->SetMessageText(strRecCount);

}
--------------------Configuration: DAO - Win32 Debug--------------------
Compiling...
DAOView.cpp
E:\c\Dao\DAOView.cpp(141) : error C2065: 'EraseList' : undeclared identifier
E:\c\Dao\DAOView.cpp(176) : error C2653: 'CCrack' : is not a class or namespace name
E:\c\Dao\DAOView.cpp(176) : error C2065: 'strVARIANT' : undeclared identifier
E:\c\Dao\DAOView.cpp(180) : error C2653: 'CCrack' : is not a class or namespace name
E:\c\Dao\DAOView.cpp(196) : error C2065: 'MAXRECORDS' : undeclared identifier
执行 cl.exe 时出错.
DAO.exe - 1 error(s), 0 warning(s)
cdkE7dTm.rar (43.11 KB) 编译出错怎么改,高手指点


搜索更多相关主题的帖子: 编译 
2005-12-29 15:06
C++大粉丝
Rank: 4
等 级:贵宾
威 望:10
帖 子:477
专家分:0
注 册:2004-4-23
收藏
得分:0 
E:\c\Dao\DAOView.cpp(141) : error C2065: 'EraseList' : undeclared identifier
E:\c\Dao\DAOView.cpp(176) : error C2653: 'CCrack' : is not a class or namespace name
E:\c\Dao\DAOView.cpp(176) : error C2065: 'strVARIANT' : undeclared identifier
E:\c\Dao\DAOView.cpp(180) : error C2653: 'CCrack' : is not a class or namespace name
E:\c\Dao\DAOView.cpp(196) : error C2065: 'MAXRECORDS' : undeclared identifier


你的英文需要加强啊!

提示出的错误需要自己修改!

undeclared identifier 没有声名标识.
is not a class or namespace name 不是类或名字空间.

I am a big fan of c plus plus.
2005-12-29 17:59
快速回复:编译出错怎么改,高手指点
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.081845 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved