Hi, according to the ISO standard, now closely tracked, the default open mode of ifstream is "in", the equivalent of C "r", therefore _file must exist_: indeed, changing your snippet to use ofstream leads to the expected behavior. Paolo. P.S. gcc-help is much more suited for this kind of doubts.