Help with warning
[PHP]//Program for Mastery
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int result, result2, result3, result4, result5; //This lists the integers being used in the project.
//The formula used to get the absolute value
result = abs(result);
result2 = abs(result2);
result3 = abs(result3);
result4 = abs(result4);
result5 = abs(result5);
/*This is the console input and output to gain the absolute
value of the integer entered into the console.
It will display the absolute value after each entered value
*/
cout << "Enter first value:";
cin >> result;
cout << result << "\n";
cout << "Enter second Value: ";
cin >> result2;
cout << result2 << "\n";
cout << "Enter third value: ";
cin >> result3;
cout << result3 << "\n";
cout << "Enter fourth value: ";
cin >> result4;
cout << result4 << "\n";
cout << "Enter fifth value: ";
cin >> result5;
cout << result5 << "\n";
return 0;
}[/PHP]
Upon compilation, I receive these warnings:
Any help would be appreciated.
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int result, result2, result3, result4, result5; //This lists the integers being used in the project.
//The formula used to get the absolute value
result = abs(result);
result2 = abs(result2);
result3 = abs(result3);
result4 = abs(result4);
result5 = abs(result5);
/*This is the console input and output to gain the absolute
value of the integer entered into the console.
It will display the absolute value after each entered value
*/
cout << "Enter first value:";
cin >> result;
cout << result << "\n";
cout << "Enter second Value: ";
cin >> result2;
cout << result2 << "\n";
cout << "Enter third value: ";
cin >> result3;
cout << result3 << "\n";
cout << "Enter fourth value: ";
cin >> result4;
cout << result4 << "\n";
cout << "Enter fifth value: ";
cin >> result5;
cout << result5 << "\n";
return 0;
}[/PHP]
Upon compilation, I receive these warnings:
Code:
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C 4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc c:\documents and settings\phil\my documents\visual studio 2008\projects\masteryp roject.cpp(12) : warning C4700: uninitialized local variable 'result' used c:\documents and settings\phil\my documents\visual studio 2008\projects\masteryp roject.cpp(13) : warning C4700: uninitialized local variable 'result2' used c:\documents and settings\phil\my documents\visual studio 2008\projects\masteryp roject.cpp(14) : warning C4700: uninitialized local variable 'result3' used c:\documents and settings\phil\my documents\visual studio 2008\projects\masteryp roject.cpp(15) : warning C4700: uninitialized local variable 'result4' used c:\documents and settings\phil\my documents\visual studio 2008\projects\masteryp roject.cpp(16) : warning C4700: uninitialized local variable 'result5' used Microsoft (R) Incremental Linker Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved.

are you there yet? if yes, you could use it 