Can anyone please explain to me why this program doesn't work ->
I'll also like to know what the compiler means by -> error C2556: 'int __cdecl functone(int,int)' : overloaded function differs only by return type from 'double __cdecl functone(int,int)'Code:#include <iostream> using namespace std; double functone(int x, int y); double functtwo(int a, int b); int main() { int num, num2; cout << "LIL' TESTING PROGRAM."; cout << endl << endl; cout << "Enter two number:"; cin >> num >> num2; cout << "Sum is " << functone(num,num2) << endl; cout << "Mult is " << functtwo(num,num2) << endl; cout << endl; return 0; } functone(int x,int y) { return (x + y); } functtwo(int a,int b) { return (a * b); }
C:\Documents and Settings\User\Desktop\example\f_testrun.cpp(4) : see declaration of 'functone'
THANKZ![]()



LinkBack URL
About LinkBacks



