Hi, I'm writing a program that reads data out of a text file and into an array of "student" structures.
The array of structures is then sorted according to "grade". If two students have the same grade, they are sorted alphabetically.
The program works, but strangely, when I add another line of information to the text file, the program hangs at the end, as if it's waiting for more input. I don't understand why it would work for one text file, but not the other if they're both ended the same way.
If someone could take a look, it would really help me out. I guess I could pass this program in like this, but I'm just really curious as to why it wouldn't work for both of my text files.
This program is set up to be used in a Linux environment like so:
or, for the second data file (the one that causes an error in the program)Code:./ex11 < data
Here's a url to download the application:Code:./ex11 < data2
http://kouellette16.home.comcast.net/ex11.tar
This is my first time using the tar utility, lol. I hope I did it correctly.
Thanks again for any help.