• Advertisement
Sign in to follow this  

Compilation errors...

This topic is 4757 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
Advertisement
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
I am not changing it, but it doesn't matter that it isn't const. Thanks anyway dude!

Anyone else? This is puzzling me greatly!

Mark Coleman

Share this post


Link to post
Share on other sites
Noooooooooooooo!

It's been such a long day, I can't believe it was a typo!

Thanks for the help mate.

Mark Coleman

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
Sign in to follow this  

  • Advertisement