Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2006, 03:06 AM
Authorized User
 
Join Date: Apr 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compilation error when declare class

hai,

I am a new to embedded visual C++. I have installed embedded visual C++ 4.0 and WinCE standard sdk 420 to do testing.

I have created a class call CPerson and add serialize function into into this class. Ihave no problem on creating and compiling this class.

But when I try to use this class as below in Document Class

SerializeDoc.h
-------------------
private:
CPerson* AddNewRecord();

SerializeDoc.cpp
-------------------
CPerson* CSerializeDoc::AddNewRecord()
{
CPerson *pPerson = new CPerson();
return pPerson;
}

when I build this after inserting this code, it give me these errors:

C:\Documents and Settings\user1\My Documents\Serialize\SerializeDoc.h(51) : error C2143: syntax error : missing ';' before '*'
C:\Documents and Settings\user1\My Documents\Serialize\SerializeDoc.h(51) : error C2501: 'CPerson' : missing storage-class or type specifiers
C:\Documents and Settings\user1\My Documents\Serialize\SerializeDoc.h(51) : error C2501: 'AddNewRecord' : missing storage-class or type specifiers

This thing already stuck me few days, can some one pls help.

Thanks in advance.

Regards.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic compilation of class based on xsd vhrao .NET Framework 3.5 0 July 7th, 2008 03:53 PM
DataGridView Error Must declare the scalar var. program2be BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 February 11th, 2007 04:39 PM
DataGridView Error Must Declare Scalar Var. program2be Visual Basic 2005 Basics 1 January 29th, 2007 11:08 PM
compilation error pratik28 C# 1 September 24th, 2006 07:39 AM
Compilation error when declare class bluebeta Visual C++ 0 April 26th, 2006 03:11 AM



All times are GMT -4. The time now is 02:37 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.