#include <iostream>
using namespace std;
int smallest();
int main()
{
int num1;
int num2;
cout << "Please enter 2 numbers to see which is smaller." << endl;
cin >> num1 >> num2;
cout << "The smaller number is " << smallest() << endl;
return 0;
}
int smallest();
{
int num1;
int num2;
if(num1 < num2);
return num1;
else
return num2;
}
question: do i need to declare those int num's again under the (int function) or is it only in int main?
this is the error its giving me
error C2447: '{' : missing function header (old-style formal list?)
its highlighing the { just below the int smallest();
there must be some kind of noob mistake on my part :(
thanks for any help
i appreciate it


Sign In
Create Account


Back to top









