the fatal error "fstream.h" file not found happen in Clion?

1.8k views Asked by At

When I use the code #include <ofstream.h> in my .h file I get this error:

"fstream.h" file not found

I use the Clion in os x.

1

There are 1 answers

0
hellow On

In C++ you should not include files (system-files), which ends with .h, instead do #include <fstream>

see: http://en.cppreference.com/w/cpp/io/ofstream