报错如下
[root@c-test-56 ~]# gcc hello.c
hello.c:1:20: fatal error: iostream: No such file or directory
#include <iostream>
^
compilation terminated.
使用g++命令编译即可
[root@c-test-56 ~]# yum -y install gcc gcc-c++ kernel-devel
[root@c-test-56 ~]# g++ hello.c -o hello
[root@c-test-56 ~]# ./hello
Hello World!