Original Post
Hey guys, this is regarding some code that I'm writing for class involving classes and methods and things of that nature. Basically im supposed to be writing a Student class with all the regular members of a student and having some methods that compute GPA , read and write that data blah blah... Well ive been having some serious problems with the buffers for input. After printing the schedules and stuff it will randomly stop taking input and crash. I have tried, gets(), getline(), cin.get(), gets_s() for usage and they all work pretty much the same. Is there a way to flush the cin/cout buffer (i know about istream/ostream::flush but it seems to me that I need to fix non-file buffers). Any feedback would be appreciated. snippets below... void collegeStudent::readSchedule(void) { cout << "-=Student Schedule=-" << endl << endl; cout << numClasses << " number of classes." << endl; //debug for (int x=0;x> coursesAndGrades[x].hours; cout << "Enter your letter grade in this class:(A-F)\n"; cin >> coursesAndGrades[x].grade; } }