-
New to C++
I just got hold of Visual C++ 6 and i am trying the followinf code. The only problem is the compiler says i have 1 error but i'm not sure where.
Here is the code.
Code:
#Include <iostream>
Using namespace std;
int main()
{
int intNumber;
cout << "Please enter a number";
cin >> intNumber;
if (intNumber > 10)
{
cout << "The Number is bigger than 10";
}
else
{
cout << "The number is less than 10";
}
return 0;
}
Any ideas on what the problem is
Jenova
-
Re: New to C++
Code:
#Include <iostream.h>
Instead of
Code:
#Include <iostream>
I think.. :)
And doesn't the compiler specify the line where the error was found, and a description?
-
Re: New to C++
#include
using
Otherwise it looks fine to me.
Double click the error in the Build output window to jump to the offending line.
-
Re: New to C++
VC++6 is bad and outdated. Look for a better one.
Aside from that, what penagate said. (C++ is case sensitive) And definitely not what Guiseppe said.