title: using fflush on C++
body: <p>Can someone help me using <code>fflush</code> in C++</p>
  
  <p>Here is a sample code in C</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  using namespace std;
  
  int a,b,i;
  char result[20];
  
  int main() {
    scanf("%d %d\n", &amp;a, &amp;b);
    for (i=1; i&lt;=10; i++) {
      printf("5\n");
      fflush(stdout);
      gets(result);
      if (strcmp(result, "congratulation") == 0) break;
    }
    return 0;
  }
  </code></pre>
  
  <p>This is program for getting interactive input.</p>
  
  <p>I usually use <code>cin</code> and <code>cout</code> so is it possible not using <code>printf</code> and <code>scanf</code>?</p>