5

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
Shantanu
  • 89
  • 2
  • 2
  • 4

2 Answers2

2

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.

Iharob Al Asimi
  • 52,653
  • 6
  • 59
  • 97
2

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

stryku
  • 722
  • 5
  • 12