#include <iostream>
#include <cstdlib>
#include <cstdio>
//This part of the code
//initialazies the main part of the code
//Then ask's the user for the yeae they were born in
int main (int nNumberofArgs, char* pszArgs [])
{
int nYear;
cout << "Enter your birth year: ";
cin >> nYear;
//Meke Determination of Century.
if (nYear > 2000)
{
cout << "You were botn in the 21st Century";
endl;
}
else
{
cout << "You were born in ";
if (nYear > 1950)
{
cout << "The second half";
}
else
{
cout << "The First Half";
}
cout << "Of the 20th Century"
<<endl;
}
system ("PAUSE");
return 0;
}
and get this error's
1 2 3 4 5 6 7 8 9
Compiling: main.cpp
J:\C++ PROJECTS\The Game\main.cpp: In function 'int main(int, char**)':
J:\C++ PROJECTS\The Game\main.cpp:13: error: 'cout' was not declared in this scope
J:\C++ PROJECTS\The Game\main.cpp:14: error: 'cin' was not declared in this scope
J:\C++ PROJECTS\The Game\main.cpp:21: error: 'endl' was not declared in this scope
J:\C++ PROJECTS\The Game\main.cpp:35: error: 'endl' was not declared in this scope
Process terminated with status 1 (0 minutes, 1 seconds)
4 errors, 0 warnings