Click here to Skip to main content
15,116,654 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About Static Control Pin
see me24-Jul-06 19:31
Membersee me24-Jul-06 19:31 
GeneralRe: About Static Control Pin
Hamid_RT24-Jul-06 20:52
MemberHamid_RT24-Jul-06 20:52 
AnswerRe: About Static Control Pin
see me24-Jul-06 19:14
Membersee me24-Jul-06 19:14 
QuestionAbout command line arguments... Pin
simonchen.net24-Jul-06 18:08
Membersimonchen.net24-Jul-06 18:08 
AnswerRe: About command line arguments... Pin
Michael Dunn24-Jul-06 19:43
sitebuilderMichael Dunn24-Jul-06 19:43 
GeneralRe: About command line arguments... Pin
simonchen.net24-Jul-06 20:02
Membersimonchen.net24-Jul-06 20:02 
GeneralRe: About command line arguments... Pin
Michael Dunn24-Jul-06 23:58
sitebuilderMichael Dunn24-Jul-06 23:58 
Question[Noob] Using class pointers [modified] Pin
Lord Kixdemp24-Jul-06 17:59
MemberLord Kixdemp24-Jul-06 17:59 
Hello everyone!
Can anyone help me here? I really don't see why this code doesn't work...

class Game<br />
{<br />
	Graphics *gfx;<br />
<br />
	// Player locations<br />
	// Car1 locations<br />
	int player_x, player_y, car1_x, car1_y;<br />
<br />
	// Movement vars<br />
	int gUpKey, gDnKey, gLtKey, gRtKey;<br />
<br />
	// Is the player in the car?<br />
	bool inCar;<br />
<br />
public:<br />
	Game(void);<br />
	~Game(void);<br />
	bool Respond();					// Respond to events (keypresses)<br />
	void PlacePlayer(int x, int y);	// Place player in its location<br />
	int Init(Graphics *gfx);		// Init class<br />
};


I get the following errors:

c:\Incoming\War Game\Game.h(7): error C2143: syntax error : missing ';' before '*'<br />
c:\Incoming\War Game\Game.h(7): error C2501: 'Game::Graphics' : missing storage-class or type specifiers<br />
c:\Incoming\War Game\Game.h(7): error C2501: 'Game::gfx' : missing storage-class or type specifiers<br />
c:\Incoming\War Game\Game.h(24): error C2061: syntax error : identifier 'Graphics'<br />


Why is that? Thanks!

BTW: Line 7 is the 3rd one, and 24 is the one before the last one...



-- modified at 23:14 Monday 24th July, 2006
AnswerRe: [Noob] Using class pointers [modified] Pin
John M. Drescher24-Jul-06 18:08
MemberJohn M. Drescher24-Jul-06 18:08 
AnswerRe: [Noob] Using class pointers Pin
bob1697224-Jul-06 18:12
Memberbob1697224-Jul-06 18:12 
GeneralRe: [Noob] Using class pointers Pin
Lord Kixdemp24-Jul-06 18:16
MemberLord Kixdemp24-Jul-06 18:16 
GeneralRe: [Noob] Using class pointers Pin
bob1697224-Jul-06 18:25
Memberbob1697224-Jul-06 18:25 
GeneralRe: [Noob] Using class pointers Pin
Lord Kixdemp24-Jul-06 18:31
MemberLord Kixdemp24-Jul-06 18:31 
QuestionSetTimer Pin
thathvamsi24-Jul-06 17:56
Memberthathvamsi24-Jul-06 17:56 
AnswerRe: SetTimer Pin
bob1697224-Jul-06 18:20
Memberbob1697224-Jul-06 18:20 
QuestionWriting to I/O Port Pin
JBAK_CP24-Jul-06 13:43
MemberJBAK_CP24-Jul-06 13:43 
AnswerRe: Writing to I/O Port Pin
John M. Drescher24-Jul-06 18:13
MemberJohn M. Drescher24-Jul-06 18:13 
AnswerRe: Writing to I/O Port - EASY! Pin
normanS24-Jul-06 20:47
MembernormanS24-Jul-06 20:47 
Questionexternal dependencies Pin
jpg64224-Jul-06 12:43
Memberjpg64224-Jul-06 12:43 
AnswerRe: external dependencies Pin
NrmMyth24-Jul-06 20:41
MemberNrmMyth24-Jul-06 20:41 
Question[Visual C++.NET] plotting 2d data [modified] Pin
franzcatch24-Jul-06 11:45
Memberfranzcatch24-Jul-06 11:45 
AnswerRe: [Visual C++.NET] plotting 2d data Pin
Justin Tay24-Jul-06 12:19
MemberJustin Tay24-Jul-06 12:19 
QuestionMFC Automation support [modified] Pin
bob1697224-Jul-06 11:35
Memberbob1697224-Jul-06 11:35 
AnswerRe: MFC Automation support Pin
bob1697224-Jul-06 12:11
Memberbob1697224-Jul-06 12:11 
Questionstrcmp Pin
jon-8024-Jul-06 10:35
professionaljon-8024-Jul-06 10:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.