write/read from file.
| Epoch (9) | |||
Ok, i got it so i can get Create to work, but before i finish that one, i want to finish the rest of the options. I get an illegal break error, what is with that? And also, what is good and bad about my code? like what do i now need in it?
| |||
| cpjust (9) | |||
| Some problems I noticed: - Your indentation is inconsistent, which makes it confusing to read and therefore harder to see problems. - Your case 'B' seems to be outside of your switch block. | |||
| vince1027 (82) | |||
| It is the case for 'B' and 'b' they are outside the block. A few suggestions: 1.) your Exit variable hasn't been initialized. doing:
could make your code less problematic. An alternative for using constants is to use global definitions/macro.
#define SENTINEL 0 2.)When making a switch statement, I would suggest using a default case. You may opt to error/input check before the switch statement, but from my experience, it is easier and simpler to do this inside the default case. EDIT: I do not see where is the file I/O in your code. | |||
This topic is archived - New replies not allowed.
