linking <iostream.h> in linux using gcc
please use g++ not gcc to compile it
cout
is defined in the std:: namespace, you need to usestd::cout
instead of justcout
.- You should also use
#include <iostream>
not the oldiostream.h
- use g++ to compile C++ programs, it'll link in the standard c++ library. gcc will not. gcc will also compile your code as C code if you give it a .c suffix. Give your files a .cpp suffix.