>But also....for some reason endl; makes my compiler freak out.
std:: likes to hide from me too. I don't ever forget to put him there, he just runs off when I'm trying to figure out where one of his buddies ran off to elsewhere in the code. Damn namespaces...
>Also, in this case what do you mean by buffer?
Most systems will allocate a big array to hold characters. They'll fill that array up and then write the contents to the device or file you want because it's more efficient than writing a single character the instant they get it. It's like caching, but the same.
Is the size of the array OS dependent?
>And are there other ways to flush this buffer?
std::flush. It works like endl, but doesn't print a newline. Or you could just wait for the buffer to get filled up or the program to terminate.
So if the buffer fills up it automatically clears? And if you terminate the program this buffer is also cleared?