[b][red]This message was edited by bigred at 2003-11-20 14:16:4[/red][/b][hr]
I have just attempted to copy the most simple C++ example out of a book. It doesn't seem to work. I am comfortable with C, but C++ is new to me. Could someone please see if they can see what's wrong?
[code]
#include using namespace std;
int main (int argc, char *argv[])
{
cout<< "Hi there" << end1;
return 0;
}
[/code]
Comments
[blue]What makes you think there is anything wrong with it? There is nothing wrong with that program. If you don't see anything it's because there is nothing to stop the program from closing. see [red]RED[/red] below for an example how to fix this.
Just noticed: you misspelled the word "endl" -- the last character is an "ell", not a "one"
[/blue]
:
: I have just attempted to copy the most simple C++ example out of a book. It doesn't seem to work. I am comfortable with C, but C++ is new to me. Could someone please see if they can see what's wrong?
: [code]
: #include
:
: using namespace std;
:
: int main (int argc, char *argv[])
: {
: cout<< "Hi there" << end[red]l;[/red]//1;
[red] cin.ignore() [/red]
: return 0;
: }
: [/code]
:
Many thanks Stober. Amazing how: [code]l & 1 [/code]can look so similar to tired eyes.
Thanks Red.