B
BWIGLEY
I'm trying to make a game and it's my first complicated project in c++
that uses multiple files, I've come up with a couple of errors and I
really don't have a clue. So if you could please take a look at my
game, I'd
really appreciate it (about 90Kb):
http://homepages.ihug.co.nz/~bwigley/Matamadia.zip
The first problem is what I think is a cyclic dependancy: display.h
and level.h include each other, and I don't know how to fix this.
The next problem (once the cyclic dependancies are fixed) is linker
errors:
eg. level.cpp refrences dsply.clean(), but the object dsply is created
by main.cpp.
I'm making it in dev-c++ too so I've included the project file for if
you have dev-c++. Dev-c++ uses g++ so there is a makefile for it
there in the file.
If you see any other obvious problems/stupidities please tell me
too...
My program uses the non-standard "pdcurses" for cursor positioning,
hopefully it will compile fine under windows but it won't compile in
it's current state under any other OS. But all refrences to curses.h
are in display.cpp (and -lpdcurses in the makefile), so for the
purposes of finding errors, references to curses could be easily
commented out (or if you really wanted too, you could replace it with
standard i/o, I've written basic instructions to change it in the file
and it wouldn't be too hard to do but it would probably run slowly and
wouldn't be worth the effort of helping me ).
that uses multiple files, I've come up with a couple of errors and I
really don't have a clue. So if you could please take a look at my
game, I'd
really appreciate it (about 90Kb):
http://homepages.ihug.co.nz/~bwigley/Matamadia.zip
The first problem is what I think is a cyclic dependancy: display.h
and level.h include each other, and I don't know how to fix this.
The next problem (once the cyclic dependancies are fixed) is linker
errors:
eg. level.cpp refrences dsply.clean(), but the object dsply is created
by main.cpp.
I'm making it in dev-c++ too so I've included the project file for if
you have dev-c++. Dev-c++ uses g++ so there is a makefile for it
there in the file.
If you see any other obvious problems/stupidities please tell me
too...
My program uses the non-standard "pdcurses" for cursor positioning,
hopefully it will compile fine under windows but it won't compile in
it's current state under any other OS. But all refrences to curses.h
are in display.cpp (and -lpdcurses in the makefile), so for the
purposes of finding errors, references to curses could be easily
commented out (or if you really wanted too, you could replace it with
standard i/o, I've written basic instructions to change it in the file
and it wouldn't be too hard to do but it would probably run slowly and
wouldn't be worth the effort of helping me ).