Need help, errors messages added as comments after line.
#include <iostream>
int Add (int x, int y)
{
cout << "In Add(), received " << x << " and " << y << "\n"; //Error C2065: 'cout' : undeclared identifier
return (x+y);
}
int main()
using namespace std; //Error C2143: syntax error : missing ';' before 'using'
{ //Error C2447: '{' : missing function header
cout << "I'm in main()!\n";
int a, b, c;
cout << "Enter two numbers: ";
cin >> a;
cin >> b;
cout << "\nCalling Add()\n";
c=Add(a,b);
cout << "\nBack in main().\n";
cout << "c was set to " << c;
cout << "\nExiting...\n\n";
return 0;
-------------------------------------------------------
Another question,
What is code tags and how do use them?
Last edited by Fnyx; October 26th, 2010 at 06:11 AM.
Reason: Code tags
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.