im making a program where i have a txt file that has names of student
basically i have to pull out those names using c++ strings and set them in alphabetical order.
for that i will be using a while loop that will read the students and update as to who is first and who is last.
it should keep a count of how many students there are and use:
while (infile >> studentName) {loop body}
these are the c++ string variables that i will be using:
string fileName;
string studentName;
string firstStudent;
string lastStudent;
these are my instructions for my assignment, but im a bit shaky on file i/o (ive only done it once) i just need to know how should i approach this! this is kinda new for me~
any help would be great guys!!
thanks so much!!! you guys are lifesavers!!!