// my first program in C++
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
-- PROGRAM ENDS, errors below --
/tmp/cci6m4eO.o: In function `main':first.cpp:(.text+0x27): undefined reference to `std::cout'
:first.cpp:(.text+0x2c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/cci6m4eO.o: In function `__tcf_0':first.cpp:(.text+0x46): undefined reference to `std::ios_base::Init::~Init()'
/tmp/cci6m4eO.o: In function `__static_initialization_and_destruction_0(int, int)':first.cpp:(.text+0x6f): undefined reference to `std::ios_base::Init::Init()'
/tmp/cci6m4eO.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
-- Compile attempted with gcc --