I am new to programming and recently downloaded bloodshed devc++ (4.9.8.0). After testing to make sure it worked like I hoped, I copy and pasted this code from one of the tutorials on this website and compiled it:
Code:
#include <iostream.h>
int main()
{
int thisisanumber;
cout<<"Please enter a number:";
cin>>thisisanumber;
cout<<"You entered: "<<thisisanumber;
return 0;
}
However, this gave errors such as <In file included from C:/DEV-CPP/include/c++/backward/iostream.h> and <#warning This file includes at least one deprecated or antiquated header.>
Then after searching for a solution from other posts I got it to work by changing the code to
Code:
#include <iostream>
using namespace std;
int main()
{
int thisisanumber;
cout<<"Please enter a number:";
cin>>thisisanumber;
cout<<"You entered: "<<thisisanumber;
return 0;
}
This goes against everything I have learned thus far and was wondering why this works the way it does.