On http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8 you say: std::ios::sync_with_stdio(false); This must be std::ios_base::sync_with_stdio(false); -- Carlo Wood <carlo@alinoe.com>