fatal error: sstream: No such file or directory

41,984

Solution 1

graphics.h is including a c++ header sstream, you can't use it when compiling with a c compiler, switch your code to c++, that can be done by simply changing the file extension to .cpp for example or .cc and gcc will automatically use g++ when compiling the file.

Solution 2

There is no stringstream's in C.In C++ they are.

Share:
41,984
Shantanu
Author by

Shantanu

Updated on July 22, 2020

Comments

  • Shantanu
    Shantanu almost 4 years

    I have included graphics.h header in my source file and i am trying to run an old C code in Code Blocks. I am using gcc version 4.8.1.I got the following error

    fatal error: sstream: No such file or directory