The entire standard template library is in the name space called "std". Therefore, if you wish to access any of the functions from iostream then you must sepcify that you are using the std namespace. This can be done one of three main ways.
First, declaring the following
using namespace std;
this says that in this scope, any function called from the standard template library will be linked to the std namespace. Additionally you can use the scope resolution operator, '::'.
#include <iostream>
int main()
{
int minutes;
minutes = 10;
std::cout << “I have “;
std::cout << minutes;
std::cout << “ minutes.”;
std::cout << endl;
minutes = minutes - 1; // modify the variable
std::cout << “Now I have “ << minutes << “ minutes left to code” << endl;
return 0;
}
Additionaly, the following will work:
#include "iostream"
using namespace std;
{
// snip
}
I think you need to look more into scope and namespace's.