I keep getting an error message in CodeBlocks it says:
Error: 'Addnumbers' was not declared in this scope
I just started with C++ and have no idea what this means. Here is my code:
#include <iostream>
using namespace std;
int main()
{
int fnum;
int snum;
cout << "Enter First number" << endl;
cin >> fnum;
cout << "Enter Second Number" << endl;
cin >> snum;
Addnumbers (fnum, snum);
return 0;
}
int Addnumbers(int fnum, int snum){
int ans = fnum+snum;
return ans;
}