gcc iostream not found in Ubuntu 13.10

c, gcc, iostream, ubuntu

Solution

You should compile with `g++`. gcc invokes C compiler.

And consider giving another extension to your source file. C++ source files usually have extension `.cc`, `.cpp` or `.C` (capital).

And yes, you have to compile it as C++. You cannot use classes and `<iostream>` in C.

Problem

I have a fresh install of Ubuntu 13.10 here for a class, and I have to write a pretty simple program just to prove that we remember things from basic programming. It just has to be a tic tac toe game, basically. Now that's all well and good but every time I've tried to compile it, it says it can't find iostream. (error message below) ``` cameron@ubuntu:~/Documents/ECE 2220$ gcc -Wall prog1.c prog1.c:1:20: fatal error: iostream: No such file or directory #include <iostream> ^ compilation terminated. ``` Now, maybe I have to use g++, but that compiles it as c++, right? Which doesn't work at all for my purposes, since it's for a class in c. I have installed build-essential, and thought that that could be the issue, but after a reinstall, it has the same issue. I can't find anything else quite like this. Does anyone have any idea how to fix the issue?

Original source