VC ADO 智能指针 异常

来源:百度知道 编辑:UC知道 时间:2024/06/18 06:42:00
--------------------Configuration: Rent - Win32 Debug--------------------
Compiling...
RentDlg.cpp
e:\vc实验\新建文件夹\rent\rentdlg.h(41) : error C2146: syntax error : missing ';' before identifier 'm_pConnection'
e:\vc实验\新建文件夹\rent\rentdlg.h(41) : error C2501: '_ConnectionPtr' : missing storage-class or type specifiers
e:\vc实验\新建文件夹\rent\rentdlg.h(41) : error C2501: 'm_pConnection' : missing storage-class or type specifiers
E:\vc实验\新建文件夹\Rent\RentDlg.cpp(118) : error C2065: 'm_pConnection' : undeclared identifier
E:\vc实验\新建文件夹\Rent\RentDlg.cpp(118) : error C2228: left of '.CreateInstance' must have class/struct/union type
E:\vc实验\新建文件夹\Rent\RentDlg.cpp(118) : error C2065: 'Connection' : undeclared identifier
E:\vc实验\新建文件夹\Rent\RentDlg.cpp(122) : error C2227: left of '->Conne

VC++,配置重新设置一下,就应该没有问题了.

建议将#import"C:\Program Files\Common Files\System\ado\msado15.dll"no_namespace rename("EOF","adoEOF")
移到stdafx.h中。