Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Scatter chart in GMS strip chart Pin
Parthiban29-Jun-10 21:50
Parthiban29-Jun-10 21:50 
GeneralRe: Scatter chart in GMS strip chart Pin
Cedric Moonen29-Jun-10 21:57
Cedric Moonen29-Jun-10 21:57 
GeneralRe: Scatter chart in GMS strip chart Pin
Parthiban29-Jun-10 22:42
Parthiban29-Jun-10 22:42 
GeneralRe: Scatter chart in GMS strip chart Pin
Cedric Moonen29-Jun-10 23:00
Cedric Moonen29-Jun-10 23:00 
GeneralRe: Scatter chart in GMS strip chart Pin
Parthiban29-Jun-10 23:46
Parthiban29-Jun-10 23:46 
GeneralRe: Scatter chart in GMS strip chart Pin
Cedric Moonen29-Jun-10 23:50
Cedric Moonen29-Jun-10 23:50 
GeneralRe: Scatter chart in GMS strip chart Pin
Parthiban30-Jun-10 0:05
Parthiban30-Jun-10 0:05 
QuestionMinGW - C++ code compiles only in example file but not my file! Pin
Trevor Johansen29-Jun-10 19:30
Trevor Johansen29-Jun-10 19:30 
So I was bored and wanted to try out Code::Blocks and MinGW with something that I knew works so I got a copy of a console RPG that works and I typed it all out myself in a separate project. The original example program compiles perfectly and runs while mine throws errors that do not make any since. I deleted the examples project file, started a new one and imported the .cpp/.h files and it still compiles so I know its not a project config error.

#ifndef RANGE_H
#define RANGE_H

struct Range
{
	int mLow;
	int mHigh;
};

#endif

#ifndef RANDOM_H
#define RANDOM_H

#include "range.h"

int Random(Range r);
int Random(int a, int b);

#endif


||=== RPG, Debug ===|<br />
C:\Documents and Settings\Administrator\Desktop\RPG\RPG - ERR\random.h|6|error: new types may not be defined in a return type|<br />
C:\Documents and Settings\Administrator\Desktop\RPG\RPG - ERR\random.h|6|note: (perhaps a semicolon is missing after the definition of `Monster')|<br />
C:\Documents and Settings\Administrator\Desktop\RPG\RPG - ERR\random.h|6|error: two or more data types in declaration of `Random'|<br />
C:\Documents and Settings\Administrator\Desktop\RPG\RPG - ERR\random.h|6|error: extraneous `int' ignored|<br />
||=== Build finished: 3 errors, 0 warnings ===|<br />


The error does not make any since, I even copy paste the contents of the example project into mine and it trows the same errors. Can someone see whats wrong?

Both project can be downloaded off my 4shared: LINK
AnswerRe: MinGW - C++ code compiles only in example file but not my file! Pin
Niklas L29-Jun-10 20:35
Niklas L29-Jun-10 20:35 
AnswerRe: MinGW - C++ code compiles only in example file but not my file! Pin
Emilio Garavaglia29-Jun-10 22:07
Emilio Garavaglia29-Jun-10 22:07 
AnswerRe: MinGW - C++ code compiles only in example file but not my file! Pin
Aescleal29-Jun-10 22:09
Aescleal29-Jun-10 22:09 
QuestionUI Question Pin
Orion Star29-Jun-10 10:44
Orion Star29-Jun-10 10:44 
QuestionRe: UI Question Pin
David Crow29-Jun-10 11:05
David Crow29-Jun-10 11:05 
AnswerRe: UI Question Pin
Richard Andrew x6429-Jun-10 12:00
professionalRichard Andrew x6429-Jun-10 12:00 
Questionmaster file table Pin
mdocvc29-Jun-10 10:13
mdocvc29-Jun-10 10:13 
AnswerRe: master file table Pin
«_Superman_»29-Jun-10 15:11
professional«_Superman_»29-Jun-10 15:11 
GeneralRe: master file table Pin
mdocvc30-Jun-10 6:52
mdocvc30-Jun-10 6:52 
AnswerRe: master file table Pin
Member 419459329-Jun-10 16:08
Member 419459329-Jun-10 16:08 
QuestionPass Message to Window Procedure Pin
Fareed Rizkalla29-Jun-10 7:26
Fareed Rizkalla29-Jun-10 7:26 
AnswerRe: Pass Message to Window Procedure Pin
Rajesh R Subramanian29-Jun-10 7:30
professionalRajesh R Subramanian29-Jun-10 7:30 
AnswerRe: Pass Message to Window Procedure Pin
«_Superman_»29-Jun-10 15:16
professional«_Superman_»29-Jun-10 15:16 
Questionwhy segmentation fault ! Pin
wbgxx29-Jun-10 7:07
wbgxx29-Jun-10 7:07 
AnswerRe: why segmentation fault ! Pin
Aescleal29-Jun-10 7:31
Aescleal29-Jun-10 7:31 
GeneralRe: why segmentation fault ! Pin
wbgxx29-Jun-10 7:38
wbgxx29-Jun-10 7:38 
GeneralRe: why segmentation fault ! Pin
Aescleal29-Jun-10 8:02
Aescleal29-Jun-10 8:02 

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.