Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Ivor Horton's Beginning Visual C++ 2005
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2005 by Ivor Horton; ISBN: 9780764571978
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 21st, 2007, 04:51 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.



  #2 (permalink)  
Old March 22nd, 2007, 05:08 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default


  Never mind. I was just typing the function in and the compiler didn't believe me. I added an override for the OnGetRecordset through the propeties window and it took it. :)



Similar Threads
Thread Thread Starter Forum Replies Last Post
chap 19 : parse-gedcom.xsl jacquesfauquex BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 4 May 29th, 2008 04:08 PM
Page 975; Ch 19 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 0 July 31st, 2006 12:25 AM
Page 973; Ch 19 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 0 July 31st, 2006 12:17 AM
SQL Express installation; Page 931; Ch 19 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 1 July 31st, 2006 12:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.