我在源文件中包含了graphics.h标头,我试图在代码块中运行旧的C代码。我使用的是gcc版本4.8.1。我收到了以下错误
fatal error: sstream: No such file or directory
答案 0 :(得分:1)
graphics.h
包含一个c ++标题sstream
,在使用ac编译器编译时无法使用它,将代码切换为c ++,只需将文件扩展名更改为例如,.cpp
或.cc
和gcc
会在编译文件时自动使用g++
。
答案 1 :(得分:1)
C. C ++中没有stringstream
,它们是。