-
help getting started
I want to design a program that prompts a user to enter their name and a grade and prompt them to either continue with input or stop input. It will loop until the user has no more entries. Then I want the input to be saved into a .TXT or .DAT file and if possible sort that file by grade. How would I go about starting that? This is all really confusing to me but I'm trying to learn..
-
first learn basic C++
Code:
PHP Code:
bool keepgoing;
student_rec rec;
do
{
ask_name(&rec);
ask_grade(&rec);
save_data(rec);
} while( wish_to_continue() )
-design a record or class to hold a name and grade
-ask_grade/name should prompt them for their grade/name and have them input it into the rec
-save data should open a file (binary) and use fstream::write
-wish to continue should ask them for a y or n to continue and return true or false
(sorting is beyond this, but not that hard)