I have a couple errors that display when building any sample C++
code I test.
(using Codeblocks)
Sample app:
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int v,u,a,t;
cout << "Enter the velocity, acceleration, time as integers : " <<
endl; cin>>u>>a>>t;
v=u+a*t;
cout << "The final velocity is " << v << "." << endl;
getch();
}
Result:
Process returned 0 (0x0) execution time : 0.000 s
Press any key to continue.
Build Messages/Errors:
C:\Program
Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning:
#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 <X>
header for the <X.h> header for C++ includes, or <iostream> instead
of the deprecated header <iostream.h>. To disable this warning use
-Wno-deprecated.|
C:\Documents and Settings\Sid\Desktop\Celsius to
Farenheit.CPP|5|error: `main' must return `int'|
C:\Documents and Settings\Sid\Desktop\Celsius to Farenheit.CPP||In
function `int main(...)':|
C:\Documents and Settings\Sid\Desktop\Celsius to
Farenheit.CPP|6|error: `clrscr' was not declared in this scope|
=== Build finished: 2 errors, 1 warnings ===|
Regardless what I change it won't run properly, not prompting for
"Enter the velocity, acceleration, time as integers : "
Any suggestions appreciated.
The deprecation message is for <iostream.h>. The Standard defines no
header, use <iostream> instead. The <conio.h> and getch() is