OK, you can't use a debugger until you get the code to compile first.
So you have declared some struct types but haven't created any.
You can do either of these:
1 2 3 4
|
struct hours {
int IDTwo;
int hours;
} HoursRecord, AnotherOne;
|
OR:
1 2 3 4 5 6 7
|
struct hours { //A description of this struct is for
int IDTwo; //desription of what this is
int hours; //desription of what this is
} ;
hours HoursRecord; //A description of how this is used
hours AnotherOne; //A description of how this one is different
|
The latter style is better as you can document them as I have shown.
If you are going to use #defines put them after the #include's before main.
I wouldn't reccommend using #defines for file names because that hard codes them - it is better to have them as a variable.
When dealing with filestreams, you should check that things work. Eg open a file, check that it worked - the file might not exist, or you get Permission Denied from OS Security.
You need a loop to read info from the file and put it into the struct.
A good way to develop code is to start with a blank file and write comments that describe how you are going to do it (A methodolgy or recipe). Then write the code, that does whats written in the comment, after the comment. Leave the comments in the code as documentation.
This help you organise all your thoughts together logically, rather tearing into writing code , then wondering why it doesn't work. It is a very basic way of "Designing" the code. Designing code is a concept that most new programmers seem to miss altogether.
Once you have written up the design as comments, you could look at the reference info on this site for all the things you need to use.
Cheers TheIdeasMan