Compilation errors...

Started by
5 comments, last by mrmrcoleman 19 years, 2 months ago
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
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?
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
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
I figured it out. Hint:

ExplanationScreen
ExplanantionScreen

Yay, typos.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Noooooooooooooo!

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

Thanks for the help mate.

Mark Coleman
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 >_<
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

This topic is closed to new replies.

Advertisement