d/v结构,通过odbc建立recordset 继承类,将其成员变量,声明为一个struct
str***,结果编译时出现一大堆错误,请帮帮我!ompiling...
DBtestset.cpp
d:\file\cad_dbms_liang2\test1\dbtestset.h(14) : error C2504: 'CRecordset' : base class undefined
d:\file\cad_dbms_liang2\test1\dbtestset.h(16) : error C2629: unexpected 'class CDBtestset ('
d:\file\cad_dbms_liang2\test1\dbtestset.h(16) : error C2238: unexpected token(s) preceding ';'
d:\file\cad_dbms_liang2\test1\dbtestset.h(45) : error C2061: syntax error : identifier 'CFieldExchange'
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(17) : error C2653: 'CRecordset' : is not a class or namespace name
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(17) : error C2065: 'classCRecordset' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(19) : error C2065: 'CDatabase' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(19) : error C2065: 'pdb' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(20) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(20) : error C2143: syntax error : missing ';' before ':'
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(21) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(54) : error C2065: 'CFieldExchange' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(54) : error C2065: 'pFX' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(55) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(82) : error C2653: 'CRecordset' : is not a class or namespace name
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(87) : error C2653: 'CRecordset' : is not a class or namespace name
test1.cpp
D:\FILE\CAD_DBMS_liang2\test1\test1.cpp(14) : error C2628: 'dbcons' followed by 'char' is illegal (did you forget a ';'?)
D:\FILE\CAD_DBMS_liang2\test1\test1.cpp(14) : error C2538: new : cannot specify initializer for arrays
D:\FILE\CAD_DBMS_liang2\test1\test1.cpp(80) : error C2665: 'new' : none of the 3 overloads can convert parameter 2 from type 'struct dbcons []'
Generating Code...
Error executing cl.exe.test1.exe - 19 error(s), 0 warning(s)
str***,结果编译时出现一大堆错误,请帮帮我!ompiling...
DBtestset.cpp
d:\file\cad_dbms_liang2\test1\dbtestset.h(14) : error C2504: 'CRecordset' : base class undefined
d:\file\cad_dbms_liang2\test1\dbtestset.h(16) : error C2629: unexpected 'class CDBtestset ('
d:\file\cad_dbms_liang2\test1\dbtestset.h(16) : error C2238: unexpected token(s) preceding ';'
d:\file\cad_dbms_liang2\test1\dbtestset.h(45) : error C2061: syntax error : identifier 'CFieldExchange'
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(17) : error C2653: 'CRecordset' : is not a class or namespace name
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(17) : error C2065: 'classCRecordset' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(19) : error C2065: 'CDatabase' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(19) : error C2065: 'pdb' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(20) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(20) : error C2143: syntax error : missing ';' before ':'
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(21) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(54) : error C2065: 'CFieldExchange' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(54) : error C2065: 'pFX' : undeclared identifier
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(55) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(82) : error C2653: 'CRecordset' : is not a class or namespace name
D:\FILE\CAD_DBMS_liang2\test1\DBtestset.cpp(87) : error C2653: 'CRecordset' : is not a class or namespace name
test1.cpp
D:\FILE\CAD_DBMS_liang2\test1\test1.cpp(14) : error C2628: 'dbcons' followed by 'char' is illegal (did you forget a ';'?)
D:\FILE\CAD_DBMS_liang2\test1\test1.cpp(14) : error C2538: new : cannot specify initializer for arrays
D:\FILE\CAD_DBMS_liang2\test1\test1.cpp(80) : error C2665: 'new' : none of the 3 overloads can convert parameter 2 from type 'struct dbcons []'
Generating Code...
Error executing cl.exe.test1.exe - 19 error(s), 0 warning(s)
解决方案 »
- 请问谁做过玻璃界面?能否给我个思路?
- 列表框点击响应事件请教
- 学习多线程编程,请教多线程的运行机理.那位能介绍介绍.
- [ 求救] 有什么方法可以高效的处理IDirect3DSurface9内的数据,为什么LockRect得到的指针处理起来会超级慢
- MFC中,类的成员函数的实现代码中
- 怎样把一个combobox放在放在全局变量里?
- 超级简单问题:参数传递?来者有分!!!!
- 推荐几个具有恶意代码的网站?我想找死....
- com的数据返回问题,如何返回一个数组?
- 能不能将文件直接以二进制方式读入? 不是通过读字符再转换
- CFileDialog的一个问题...50 分相送----------->>>>>>>
- 如何解决这两个WARING 和ERROR? 编译问题~各25分
#include <afxdb.h>
声明 Class CRecordset;(在用到之前)