Sign in to follow this  

Compilation errors...

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this .h file.
#ifndef EXPLANATIONSCREEN_H
#define EXPLANATIONSCREEN_H

#include "Screen.h"

class ExplanationScreen : public Screen
{
public:
	//(De)Constructors
	ExplanationScreen();
	ExplanationScreen(ExplanantionScreen & rhs);
	~ExplanationScreen();

	// Over-ridden operators
	ExplanationScreen& ExplanationScreen::operator=(ExplanationScreen& rhs);

	// Public member functions
	HRESULT HandleMessage(UINT MessageType, WPARAM wparam, LPARAM lparam);
	HRESULT Initialise();
	void OutputScreenInformation();
	HRESULT RenderScreen();
	void NextScreen();
	void StartScreen();

private:
	HRESULT HandleMouseEvent(UINT MessageType, WPARAM wparam, LPARAM lparam);
	HRESULT HandleGraphEvent(UINT MessageType, WPARAM wparam, LPARAM lparam);
	HRESULT HandleInputEntity(string InputDescriptor);
};
#endif


I get the following error:
C:\Documents and Settings\Mark\StarChart\Testing\Screen Entity Inheritance Test\ExplanationScreen.h(11) : error C2629: unexpected 'class ExplanationScreen ('
C:\Documents and Settings\Mark\StarChart\Testing\Screen Entity Inheritance Test\ExplanationScreen.h(11) : error C2238: unexpected token(s) preceding ';'

on this line: ExplanationScreen(ExplanantionScreen & rhs); I can't see the problem, can you? I can post other related files if necessary, Thanks. Mark Coleman

Share this post


Link to post
Share on other sites
Is there a missing semicolon at the end of Screen.h?

Err, nevermind, if it's the line with 'ExplanationScreen(ExplanantionScreen & rhs);', it looks fine but it should probably take a constant argument. You're not changing what you're copying, are you?

Share this post


Link to post
Share on other sites
Heh. I once spent about half an hour looking at my DirectInput code, and trying to find out why it was saying that Aquire() wasn't a function of IDirectInputDevice7. It's because it's spelt Acquire >_<

Share this post


Link to post
Share on other sites
Ha ha! I am always doing things like this. If Word can correct my stupid typos then why can't MSVC++?

I once spent one month in Turbo Pascal trying to find a bug, which ended up being a missed semi colon. AAAARRRRGGHHH!

Mark Coleman

Share this post


Link to post
Share on other sites

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this