GeniusOfEvil’s Blog

It is a sin to believe evil of others, but it is seldom a mistake.

Mixing stdio with iostream

leave a comment »

When mixing C stdio and C++ iostream synchronization problems can occur because the two libraries use different buffering strategies. This seems a major drawback since mixing C++ code with C libraries (that uses stdio) is a very common practice. Luckily, all we have to do to avoid these problems is to call function

ios::sync_with_stdio()
Advertisements

Written by Jarek Przygódzki

March 26, 2009 at 9:43 am

Posted in C++, Cpp, Programing

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: