Jump to content
  • Advertisement
Sign in to follow this  
mrmrcoleman

Compilation errors...

This topic is 4971 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
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!