Wrox Programmer Forums
|
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 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
 
Old September 10th, 2004, 03:05 PM
Authorized User
 
Join Date: Aug 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Spivonious
Default unexpected end of file

Yeah I know this usually means a semi-colon is missing, but I can't find it. Any guesses?

[edit]: I'm using the VC++ 2005 Express Beta. I've included both files in my project (a wizard-formed .NET application)

//implementation of CCard

#include "CCard.h"

CCard::CCard()
{
    mSuit = Spades;
    mValue = Ace;
}

CCard::CCard(SUIT suit, int value)
{
    mSuit = suit;
    mValue = value;
}

And just for fun, here is CCard.h

enum SUIT {Hearts=0, Spades=1, Clubs=2, Diamonds=3};
enum FACECARD {Ace=1, Jack=11, Queen=12, King=13};

class CCard
{
public:
    CCard();
    CCard(SUIT suit, int value);
private:
    SUIT mSuit;
    int mValue;
};

#include "CCard.cpp"
 
Old September 19th, 2004, 07:57 PM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

#include "CCard.cpp" ??? Why do you add this?

And I can't find #include "stdafx.h".
Did you select "Not useing precompiled header files" in project setting?
 
Old September 21st, 2004, 07:44 AM
Authorized User
 
Join Date: Aug 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Spivonious
Default

Thanks. Now I know what the stdafx.h is for :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected end of file while parsing PI... rageypeep .NET Framework 3.5 2 June 20th, 2008 04:18 AM
Unexpected end of file while parsing... anup_daware C# 1 February 7th, 2007 05:14 AM
Oracle Back End - MS Access Front End - Multi User ckaliveas Oracle 1 February 1st, 2007 06:00 AM
Parse error: parse error, unexpected $end Ayodeji Adegbaju Pro PHP 3 January 12th, 2007 12:21 PM
unexpected end of file question Spivonious C++ Programming 4 September 15th, 2004 02:24 AM





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