I'm using Xcode4, and when i try to run the following:
#include <iostream>
int add(int x,int y)
{
return x + y;
}
int main()
{
using namespace std;
cout << "Enter A Number";
int x;
cin >>x;
cout << "And Another";
int y;
cin >>y;
cout << "The Answer is:" << add(x,y) << endl;
return 0;
}
it says "no previous function prototypes for function 'add'"
I'm probably just making some noobish mistake, but it would be appreciated if any of you knew whats wrong