This is some great work Adak, truely. Thanks.
Yes it does compile for me, and obviously as you said it won't all work due to the transaction parts, so when ran, there is about 10 lines of empty space (not sure from which function but jsut looks like repeated \n's) and then it begins with the:
Code:
Error: The record for Dave already exists
Press Enter to Continue
Error: The record for Rob already exists
Press Enter to Continue
Error: The record for Steve already exists
Press Enter to Continue
Error - that record is not available, hit Enter to Continue
20 Transactions were processed, with 6 errors
20 records read from data file
Key Name Total Points Percent of 350 Points
=============================================================
100 Jeff 313 89.43%
101 Mark 223 63.71%
102 Jenn 317 90.57%
103 Chris 190 54.29%
104 Matt 295 84.29%
105 Dan 274 78.29%
106 Dave 253 72.29%
107 Rich 327 93.43%
108 Mike 214 61.14%
109 Tony 247 70.57%
110 Rob 282 80.57%
111 Sonny 267 76.29%
112 Luke 285 81.43%
113 April 257 73.43%
114 Sheryl 318 90.86%
115 Tom 266 76.00%
116 Lamont 287 82.00%
117 Steve 348 99.43%
118 Jake 271 77.43%
219 Austin 260 74.29%
20 records read from record file
Program Complete - Press Enter When Ready
Utterly perfect program other than those few errors, again, amazing work Adak.
Is it only the type zero functions that aren't working properly? everything else is working perfectly?
Clearly your skills in this are far and away a million times better than mine, but conceptually, it doesn't seem like the type 0 should give much trouble since its just asking the user for a new name and key (which could be just the next in line key? Id think? and then simply setting all the other values to zero. I don't know how I would do it but after looking at you're work and in that area, I am not seeing what the issue may be.. Sorry I am truly of no help heh.
I can see you're workings of asking the user for the new name, but then I see asking for the test scores and such, I thought they were supposed to be set to zero? or are they just set to zero by default and the user enters them in from there, which it seems you are trying to do.
and this has an address for dummy2 but you don't see it anywhere else in the program, so I assume this is code you're still working on (esp. since its negated with the //'s)?
Code:
//if(Ttype != -1) {
aTransPtr = (struct Transaction *) malloc (sizeof (struct Transaction));
aTransPtr->type = Ttype;
aTransPtr->key = Tkey;
aTransPtr->value = Tvalue;
strcpy (aTransPtr->name, Tname);
//}
//else
// aTransPtr = &dummy2;
aaaand another thing (I know, broken record, sorry..) but what does this do;
Code:
free(theStudentPtr);
free(theTransPtr);
free(newStudentPtr);
Does that just wipe it clean of all the information?
and lastly, just out of curiosity, which compiler are you using?