Weird, the preprocessor directive isn't showing the included library. Well, anyway...
I may be able to help you, but you must fix your code first.I don't think a modern compiler will allow
I'm pretty sure gcc doesn't, and its a bad idea anyway. Main should always return something, usually an int.
I'm quite sure that...
won't compile. The operator << has to be complete. Eliminating all your errors in syntax, I think your code should look like this...
Now then, this exact code typed into vim and compiled with gcc gives an output of 999, which is exactly as I assigned to x in line 7. I input an "a" but it was not assigned to x, I guess because x is an int, not a char.
#include <iostream> // or <iostream.h> depending on your compiler
using namespace std;
x = 999;
cout << "enter x: ";
cin >> x;
cout << x;
Last edited by yawningdog; 11-28-2003 at 10:20 PM.
“The highest glory of the American Revolution was this: It connected in one indissoluble bond, the principles of civil government with those of Christianity." -John Quincy Adams