Fairly simple c++ question.

From: Jack. (jack_at_jack.com)
Date: 12/22/03


Date: Mon, 22 Dec 2003 17:43:05 +0000

Hi.

I haven't been learning C++ for too long, but I'm having trouble with
a simple program in the book I've been learning from. Can you tell me
why I receive error message "parse error before '<<' token" in this
code? (I've marked line 18 for reference, I didn't try to compile it
with that in). If it helps any, I'm currently using dev-c++, from
bloodshed.

#include <iostream.h>
int Add (int x, int y)
{
 cout << "In Add(), received " << x << " and " << y << "\n";
 return (x+y);
}

int main()
 {
        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; (<---- Line 18)
        cout << "\nExiting...\n\n";
         return 0;
}