Chap 19 Page 957
I've rebuilt DBSample 2 times and I keep having the same problem when I try to build after adding the 2nd recordset.
the problem seems to be with overriding the virtual OnGetRecordset function on p 957. I get all these errors
Error 1 error C2143: syntax error : missing ';' before '*' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 2 error C2433: 'COrderView::CRecordSet' : 'virtual' not permitted on data declarations c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Warning 5 warning C4183: 'OnGetRecordset': missing return type; assumed to be a member function returning 'int' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 6 error C2555: 'COrderView::OnGetRecordset': overriding virtual function return type differs and is not covariant from 'CRecordView::OnGetRecordset' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 54
Error 7 error C2143: syntax error : missing ';' before '*' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 8 error C2433: 'COrderView::CRecordSet' : 'virtual' not permitted on data declarations c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp
projects\dbsample\dbsample\orderview.h 38
Error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Warning 11 warning C4183: 'OnGetRecordset': missing return type; assumed to be a member function returning 'int' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 38
Error 12 error C2555: 'COrderView::OnGetRecordset': overriding virtual function return type differs and is not covariant from 'CRecordView::OnGetRecordset' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.h 54
Error 13 error C2143: syntax error : missing ';' before '*' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.cpp 58
Error 14 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.cpp 58
Error 15 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.cpp 59
Error 16 error C2440: 'return' : cannot convert from 'COrderSet *' to 'int' c:\documents and settings\roger\my documents\visual studio 2005\projects\visual cpp projects\dbsample\dbsample\orderview.cpp 61
I wonder if anyone has a clue as to whats going wrong. When I looked up error C2555 it said it was a bug in Visual Studio that was supposed to be fixed in .NET.
Thanks.
|