Hi,

I am a newbie at C++.
I've made my first program in C++.
It's quite small, 181 lines of code in fact
I finally got it to compile and run successfully

The thing is, I had to use the flush command very often.
Without them, the program wasn't running well

Here is an example of what I was using:

cout<<"text"<<flush;

My question is, is there a certain pattern that I must use for the flush command? In other words, when do I have to use it?

I found that I never know exactly when to use it, in fact, I had to keep trying it in different places until it finally worked well.

Any ideas?

Marc