Oops!
I compile remotely on a linux command prompt, but write on a windows text editor. looks like i confused things while using my file transfer software and the executable file is only 123 KB, not MB.
But, now that I have your attention, I'd love some more advice!
~Gaminic
I only have two typdefs -- that Gamep is a pointer to a game and Eventp is a pointer to an event. I'm sorry if that wasn't more clear. Code is meant to be read though (and not just by the person who wrote it!) and I'm all for making good habits so I'll try and correct this.
~coder 777
Declaring my structs as consts seems like a good idea, however after creating each Game I also have to use addEvent to addEvents to it. addEvent goes into the struct game and alters the NULL event pointer to point to another event. I believe this would not work with const, no?
But I am very interested in your suggestion to write a gui to enter all the data. This raises a ton of new questions I have regarding data entry, as well as using multiple sourcer/header files.
First, how do I access objects I've defined in one source file in another?
I know how to combine multiple project files using makefiles and the make command, but as far as I know I can only access functions and types of classes/structs.
Put simply, How do I access the struct Game *MypracticeGame that I have defined in WC1930data.cpp in, say, main.cpp? Or the class WC that I've defined in WC1930data.cpp in main.cpp? THis should be fairly straightforward no?
Next, does anyone have any good resources to point me towards for designing a simple GUI in c++ for data entry? I am also willing to learn C#, since this is sort of a "learning" project and I'm sure they already have classes defined to help me here. Plus, C# is used by a lot of software consulting companies I'm applying for.
. My original idea was just to read everything into the command prompt. You know, something simple like....
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
string TeamAName;
int AfinalScore;
cout<< "\nHello! Lets make a game. Enter A's Team Name:";
cin << TeamAName;
cout <<"\nNow enter A's final score:";
cin << Afinalscore;
//etc etc until I've entered all variables of interest for this game
PGame = MGame( TeamAName,Afinalscore, ...., ...., .... etc etc);
| |
Two problems I see with this.
One is that If i mess up somewhere, there's not an easy way to go back, at least not like in say, excel, where I can just erase the value in the excel workbook and put in a new one. Though I'm sure I could work around this somehow, this would definitely be easier with a GUI
THe second problem is, once I run the program and enter all of my data, I would have to define all of these games and data in a way that they would continue to exist event after main() returns. I'm assuming I do this by making all of my World cups, games and events static. Then I would have to find a way to access them in another program (which I don't now how to do, as stated earlier).
Anyways, thanks a lot for all of your guys suggestions in helping a newbie out. Much appreciated!
-Trent