Bloodshed Dev-C++ 4.9.9.2 |
Consider the program i have written in Dev C++ which shows a few errors:
#include
#include
void main()
{
int a,b;
cout<<"Enter two numbers whose sum to be found :";
cin>>a>>b;
cout<<"\n The sum is: "<
getch();
}
Now this program in logic doesn't have any errors can be compiled and used under Turbo C++ compiler and not on this one.The errors for the above written program are listed below:
- 1 C:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from C:\Users\Athul Jayachandran\Desktop\sum.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from C:\Users\Athul Jayachandran\Desktop\sum.cpp
- 32:2 C:\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the
header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
Now the code would change to the following:
#include
int main()
{
int a,b;
std::cout<<"Enter two numbers whose sum to be found :";
std::cin>>a>>b;
std::cout<<"\n The sum is: "<
}
Compiler returns no errors now |
Program has been compiled and run. |