Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>ios::sync_with_stdio</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ios::sync_with_stdio

Usage

   #include <iostream.hpp>
   static void ios::sync_with_stdio();

Description

   Causes the standard streams cin cout, cerr, and, if applicable, clog, to
   use alternative buffers (type stdiobuf) that are linked to stdin , stdout
   and stderr respectively. The format flags are also set so that unit
   buffering is in force, that is so that the stream is flushed after each
   operation, and so that stdout and stderr are also flushed after each
   operation. This provides the capability to mix code using the stdio
   functions like printf() and putc() with IOStream style I/O. -   Using
   this option will substantially reduce efficiency. It should not be used
   for new code.

Example 

   ios::sync_with_stdio();
   for (int i = 100, i--;) {
       printf("This is from stdio,\n");
       cout << "but this came from cout\n";
   }






Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson