(It opens and reads from a data file id’s and grade and name. The number of lines of input is unknown )
the number of line input unknown so the peogram asks for unlimited no maxmium i put the number 100 for the size i dont know how to do unlimited and i guess the doctor will take points for that ...
the course is called c++ and we use devc++ to work with ..
anyway there is 12 hour left for the sumbmission and i dont think i will complete it on time so thanks guys for your help
It was my way of signifying a failure to properly execute.
A return/exit code of anything other than '0' tells the OS that the program did not execute properly, and it is a way to 1) determine why it crashed and 2) inform the user that it did not operate properly.
My code that I just put there can read and print an arbitrary number of lines, as long as the lines has a long, followed by an integer, followed by a string. the "== 3" is making sure it captures all 3 pieces on the line. If it doesn't capture all 3, it should stop reading the file.
DevC++ is an IDE, not a language. The language for this program is very much C.
If you're not able to use either of those, the only thing I can think of is calling a function that reallocates and increases the array size. I would write it out but I'm not too familiar with allocation in C... Perhaps C has a way of allocating one additional item at the end of the array.