Shantanu
Shantanu

Reputation: 89

fatal error: sstream: No such file or directory

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

Upvotes: 5

Views: 52298

Answers (2)

stryku
stryku

Reputation: 750

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

Upvotes: 2

Iharob Al Asimi
Iharob Al Asimi

Reputation: 53026

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.

Upvotes: 2

Related Questions