Why is it that flushall(); works for me in this code and cout.flush(); doesn't??
basically, when I have flushall(); it works fine in that the program doesn't skip the getting name thing. but if I put cout.flush(); it doesn't work and if I don't have any flushing thing there it acts as it would with cout.flush() or rather cout.flush acts as if there wasn't any flusher.Code:while ( i<drivers ) { cout.flush(); //not working like flushall(); // flushall(); //was used, but it don't really want //to need to have it there if possible cout<< endl << "What is your name: "; cin.getline( TempName, NAME_SIZE ); // to be entered into a struct, but I didn't put it in this // cause it would just clutter up the post }
I bet that if someone compiles this they actually won't need a buffer for it which leads me to further confusion ... argh



LinkBack URL
About LinkBacks


