NEED HELP WITH CODE :O
3 posters
CMPC :: Computing :: Programming :: C++
Page 1 of 1
NEED HELP WITH CODE :O
http://www.mediafire.com/?hnzynamzijg
that's my project. the files are a devc++ project but you can still read the txt files.
I'm having trouble compiling this because of the #include stuff. HELP AND EXPLAIN WHAT'S WRONG!
that's my project. the files are a devc++ project but you can still read the txt files.
I'm having trouble compiling this because of the #include stuff. HELP AND EXPLAIN WHAT'S WRONG!
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
i revised it a bit and now it compiles
http://www.mediafire.com/?m2zdmnygjwi
but did i do it properly? I think i kinda understand wtf i'm doing now
http://www.mediafire.com/?m2zdmnygjwi
but did i do it properly? I think i kinda understand wtf i'm doing now
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
Wow. . .
1) Wait.h
change #define WAIT_H to #ifndef WAIT_H
change #ifdef WAIT_H to #define WAIT_H
2) Player.h
change #define PLAYER_H to #ifndef PLAYER_H
change #ifdef PLAYER_H to #define PLAYER_H
3) Castlevania.h
switch the order of your fist two lines #define to #ifndef and #ifndef to #define
4) Courtyard.h
same as above
5) Enemies.h
change #define to #ifndef
change #ifdef to #define
. . .
. . .
. . . . . . . . . .
forget it!
I'm just gunna email the fixed files to you
1) Wait.h
change #define WAIT_H to #ifndef WAIT_H
change #ifdef WAIT_H to #define WAIT_H
2) Player.h
change #define PLAYER_H to #ifndef PLAYER_H
change #ifdef PLAYER_H to #define PLAYER_H
3) Castlevania.h
switch the order of your fist two lines #define to #ifndef and #ifndef to #define
4) Courtyard.h
same as above
5) Enemies.h
change #define to #ifndef
change #ifdef to #define
. . .
. . .
. . . . . . . . . .
forget it!
I'm just gunna email the fixed files to you
Paul- Pickaxe
- Posts : 611
Re: NEED HELP WITH CODE :O
basically you had the order backwards
check before defining
on some of them you forgot the n in #ifndef
check before defining
on some of them you forgot the n in #ifndef
Paul- Pickaxe
- Posts : 611
Re: NEED HELP WITH CODE :O
oh yeah i forgot to post that i figured out that i needed to define before i checked.
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
I sorta understood what i was doing in the "places" files (courtyard, inn, forest, castlevania)
but not sure what the player.h and enemies.h files are ifndef first and not define first.
but not sure what the player.h and enemies.h files are ifndef first and not define first.
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
oh wait nevermind what i just said anyway.
What i did: changed all my files to
#ifndef filename
#define filename
#endif
but courtyard is #ifdef then #define. That seems to have the least errors. All it says is ....
in my main function it keeps saying that the courtyard function is undeclared even after checking that i included the courtyard function and it's spelled correctly.
What i did: changed all my files to
#ifndef filename
#define filename
#endif
but courtyard is #ifdef then #define. That seems to have the least errors. All it says is ....
in my main function it keeps saying that the courtyard function is undeclared even after checking that i included the courtyard function and it's spelled correctly.
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
http://www.mediafire.com/?hn0fzn0tm4n
new version
please find what's wrong and EXPLAIN. not just tell me what to fix.
new version
please find what's wrong and EXPLAIN. not just tell me what to fix.
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
All the preprocessor stuff was correct and when I compiled it it compiled and ran just fine.
Paul- Pickaxe
- Posts : 611
Re: NEED HELP WITH CODE :O
Admin wrote:http://www.mediafire.com/?hn0fzn0tm4n
new version
please find what's wrong and EXPLAIN. not just tell me what to fix.
do you mean this one had no errors? I'm using devC++ and i have all of this bullshit
keeps saying i have multiple definitions of a function. i'm guessing it's included twice or more.
Are you using VC++?
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
Allen maybe you should set how strict the compiler is...
Unchained- Mod
- Posts : 448
Re: NEED HELP WITH CODE :O
wow when i try it with my Quincy 2005 compiler everything works. But when I try it with DevC++ or VC++ it just fucks up in errors.Unchained wrote:Allen maybe you should set how strict the compiler is...
DAMMIT WHY!!
how do i set the strictness?
Admin- Pirate King
- Posts : 559
Re: NEED HELP WITH CODE :O
Its different in every IDE, I left it as the default in VC++.
It looks like you just redefined a bunch of stuff.
It looks like you just redefined a bunch of stuff.
Unchained- Mod
- Posts : 448
CMPC :: Computing :: Programming :: C++
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|