I'm very new to programming and all but anyway, Ok here is the problem, i've built a really, really basic program and i've tried to build it and run it but i keep getting a build failure message, now when i click on this message this is what comes up:
Command/Deveioper/usr/bin/g++-4.0 failed with exit code 1.
This is my code:
{
cout << fixed << setprecision(2);
double num1 = 0.0;
int num2 = 0;
double answer =0.0;
cout <<"please enter temperature: ";
cin >> num1;
cout <<"please enter which temperature you have entered, press 1 for Fahrenheit or 2 for Celsius: ";
cin >> num2;
if (num2 == 1){
answer = (num1 -32) * 5.0/9.0;
}
else if (num2 == 2){
answer = (num1 * 9.0/5.0) +32;
}
cout <<answer;
system("pause");
return 0;
}
Now i have built this and run it on the uni computers with visual studio 5.5, and i'm working with Xcode 3.0.
so if anyone has any advice that can help me please do, i have an assignment due in 4 days and it needs to be working. (this isn't the assignment, just a prac that we did)
Command/Deveioper/usr/bin/g++-4.0 failed with exit code 1.
This is my code:
{
cout << fixed << setprecision(2);
double num1 = 0.0;
int num2 = 0;
double answer =0.0;
cout <<"please enter temperature: ";
cin >> num1;
cout <<"please enter which temperature you have entered, press 1 for Fahrenheit or 2 for Celsius: ";
cin >> num2;
if (num2 == 1){
answer = (num1 -32) * 5.0/9.0;
}
else if (num2 == 2){
answer = (num1 * 9.0/5.0) +32;
}
cout <<answer;
system("pause");
return 0;
}
Now i have built this and run it on the uni computers with visual studio 5.5, and i'm working with Xcode 3.0.
so if anyone has any advice that can help me please do, i have an assignment due in 4 days and it needs to be working. (this isn't the assignment, just a prac that we did)