I keep getting an error and I don't know why. I tried searching the forums with no good answer. It compiles and runs properly in Visual Studio but not on Dev-C++. Anybody cares to help?
Are you running on Windows Vista? Because I had problems compiling C++ code in Windows Vista using Dev-C++. If you are running on Windows Vista, look for the topic where I posted a fix for it. (Sorry, can't provide a link. I can't find the topic, lol)
-JaDe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I keep getting an error and I don't know why. I tried searching the forums with no good answer. It compiles and runs properly in Visual Studio but not on Dev-C++. Anybody cares to help?
include<iostream>
include<cstdlib>
using namespace std;
float add(float num1, float num2)
{
return num1 + num2;
}
float minus(float num1, float num2)
{
return num1 - num2;
}
int main(void)
{
cout<<"Please enter a number:";
float a;
cin >> a;
cout << "Please enter a number:";
float b;
cin >> b;
cout << add(a, b);
cout << minus(a, b);
system("PAUSE");
return 0;
}
Are you running on Windows Vista? Because I had problems compiling C++ code in Windows Vista using Dev-C++. If you are running on Windows Vista, look for the topic where I posted a fix for it. (Sorry, can't provide a link. I can't find the topic, lol)
-JaDe