I can't seem to figure this one out. Trying to create a class that allows the user to input information about a student and tally up the final grade and letter grade as shown below. Afterwards, it displays the information and writes it to the file. Help!!!
http://en.wikipedia.org/wiki/Class_(computer_science) : "A class is a programming language construct that is used as a blueprint to create objects. This blueprint includes attributes and methods that the created objects all share."
<cstdlib> is not used. <cmath> is not used. <algorithm> is not used.
doubles are unnecessary. Use floats instead. char name...; A char is an integral constant, not a string. Use std::string, whose header I see you have already included. name=0; By intializing 'name' to zero, the while loop will never execute. However, since you've already changed the type of 'name' to std::string, you can leave it uninitialized.
Make the loop infinite (put a 1 in the condition), and instead perform a check after the name is entered. while (name != 'Q') While you have correctly used single quotes to compare with a char, this is now an std::string, so the condition is incorrect. This is what you should use after entering the name:
1 2
if (!strcmp(name.c_str(),"Q") || !strcmp(name.c_str(),"q"))
break;
You never open outFile with something like std::ofstream outFile("out.txt");
I spared you because the program was short. I should have asked you to refine your question.