Click here to Skip to main content
15,904,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: trouble with an if/else statement Pin
prasad_som9-Sep-06 20:10
prasad_som9-Sep-06 20:10 
AnswerRe: trouble with an if/else statement Pin
bob169729-Sep-06 20:24
bob169729-Sep-06 20:24 
GeneralRe: trouble with an if/else statement Pin
bob1697210-Sep-06 8:05
bob1697210-Sep-06 8:05 
AnswerRe: trouble with an if/else statement Pin
Michael Dunn9-Sep-06 20:48
sitebuilderMichael Dunn9-Sep-06 20:48 
QuestionMicrosoft Windows Mouse Zoom Pin
Juan Ker9-Sep-06 19:32
Juan Ker9-Sep-06 19:32 
AnswerRe: Microsoft Windows Mouse Zoom Pin
Juan Ker11-Sep-06 9:55
Juan Ker11-Sep-06 9:55 
QuestionbyTwo problem with UNICODE apps Pin
TommyTooth9-Sep-06 18:47
TommyTooth9-Sep-06 18:47 
QuestionNonsense C++ errors... Pin
Lord Kixdemp9-Sep-06 15:51
Lord Kixdemp9-Sep-06 15:51 
Hello everyone!
(Note: I first posted this question here)
But I'll repost it, hopefully more clearly... Smile | :)

So let's say I have an error-free Player class... It's located on the files Player.h and Player.cpp. But there's a problem, the files don't include correctly... I've tried putting the class along with another class in Game.h/cpp, and that compiled, but not otherwise... Here's the code at the top of my files:

[Main.cpp]<br />
#include "Includes.h"<br />
<br />
[Includes.h]<br />
#pragma once<br />
<br />
// C++<br />
#include <iostream><br />
#include <string><br />
#include <stdlib.h><br />
#include <time.h><br />
#include <vector><br />
using namespace std;<br />
<br />
// SDL<br />
#include "SDL.h"<br />
#include "SDL_image.h"<br />
<br />
// Game<br />
#include "Defines.h"<br />
#include "Structures.h"<br />
#include "HelperFuncs.h"<br />
#include "Vehicle.h"<br />
#include "Player.h"<br />
#include "Game.h"<br />
<br />
[Game.h]<br />
#pragma once<br />
<br />
#include "Includes.h"<br />
<br />
[Game.cpp]<br />
#include "Game.h"<br />
<br />
[Player.h]<br />
#pragma once<br />
<br />
#include "Includes.h"<br />
<br />
[Player.cpp]<br />
#include "Player.h"


I tried everything on the previous thread, nothing worked... The error in VC++ 2005 is:
1>c:\incoming\war game\Game.h(10) : error C2146: syntax error : missing ';' before identifier 'mainPlayer'<br />
1>c:\incoming\war game\Game.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br />
1>c:\incoming\war game\Game.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int


(Note: The 10th line doesn't matter, as I said the thing works if I merge Game and Player...)

If you can help me, I'll give you a cookie! Laugh | :laugh: Thanks!

PS: At first, I thought it was a problem with SDL not being compatible with VC++ 2005 because SDL download page says VC 5/6/7, not 8, but it doesn't compile under Code::Blocks (MinGW) either, it gives a similar error...



Windows Calculator told me I will die at 28. Frown | :(

AnswerRe: Nonsense C++ errors... Pin
Christian Graus9-Sep-06 16:24
protectorChristian Graus9-Sep-06 16:24 
GeneralRe: Nonsense C++ errors... Pin
Lord Kixdemp9-Sep-06 16:41
Lord Kixdemp9-Sep-06 16:41 
GeneralRe: Nonsense C++ errors... Pin
John M. Drescher9-Sep-06 16:58
John M. Drescher9-Sep-06 16:58 
GeneralRe: Nonsense C++ errors... Pin
Lord Kixdemp9-Sep-06 17:10
Lord Kixdemp9-Sep-06 17:10 
GeneralRe: Nonsense C++ errors... Pin
Christian Graus9-Sep-06 17:27
protectorChristian Graus9-Sep-06 17:27 
AnswerRe: Nonsense C++ errors... Pin
Michael Dunn9-Sep-06 17:18
sitebuilderMichael Dunn9-Sep-06 17:18 
GeneralRe: Nonsense C++ errors... Pin
Lord Kixdemp9-Sep-06 18:41
Lord Kixdemp9-Sep-06 18:41 
GeneralRe: Nonsense C++ errors... Pin
Michael Dunn9-Sep-06 18:54
sitebuilderMichael Dunn9-Sep-06 18:54 
GeneralRe: Nonsense C++ errors... Pin
Lord Kixdemp11-Sep-06 9:33
Lord Kixdemp11-Sep-06 9:33 
Questioncopy data from two buffer into one Pin
venadder9-Sep-06 12:49
venadder9-Sep-06 12:49 
AnswerRe: copy data from two buffer into one Pin
venadder9-Sep-06 13:06
venadder9-Sep-06 13:06 
AnswerRe: copy data from two buffer into one Pin
Justin Tay9-Sep-06 15:23
Justin Tay9-Sep-06 15:23 
AnswerRe: CTyptedPtrList error ! Pin
tanvon malik9-Sep-06 16:39
tanvon malik9-Sep-06 16:39 
QuestionMet problems with my first win32 program Pin
bloodwinner9-Sep-06 11:04
bloodwinner9-Sep-06 11:04 
AnswerRe: Met problems with my first win32 program Pin
Rick York9-Sep-06 11:51
mveRick York9-Sep-06 11:51 
GeneralRe: Met problems with my first win32 program Pin
bloodwinner9-Sep-06 12:33
bloodwinner9-Sep-06 12:33 
GeneralRe: Met problems with my first win32 program Pin
Rick York9-Sep-06 12:41
mveRick York9-Sep-06 12:41 

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.