C++ Cricket Game LinkedList object dying across multiple .cpp files

I have been asked to develop a cricket game in Microsoft Visual C++ 6.0

I have been told it is a sufficiently large enough program to use Control Classes. That i should not bulk my program up into main.

I have started to seperate the functions out however when i create an object and assign data to the object. When i come to call on this object in another .cpp file it return 0 or -8576930 as if it hasnt been initialised. I am sure it is due to scope of variables and objects however i am not able to put my finger on just what it is it wants/needs to allow me to see the objects data i just created in the other .cpp file.

I know this isnt the clearest of description but if anyone can shed any light on this particular problem.. i would be gratefull..

If i was left to program it in the main it would not be a problem i dont think but they have specifically asked that code be structured into control classes....

If anyone would like to download or take a look at my program for me let me have an email address and i can forward you my efforts....
Adrian


Comments

  • VC++ 6.0 has an excellent debugger -- compile the program for debug and step through the program so that you can see the value of the variables.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion