So... I've tried the ACSII enhanced iostream (or whatever it is), but it seams not to be fond of the "using namespace std" bit...
The code (with little comments):
#include <iostream> using namespace std
int main()
{
cout << "blah" << "more blah" << "and even more blah" endl; //this would make this version 2.0 of the example given by Ooble which includes one extra blah! ;)
/*so I seem to remember
how to use everything
so far, right?*/
return 0;
}
//WRONG!!! I'm getting errors... :(
So this should make everything work, right? Wrong!
I'm getting the following errors from the (bloodshed) compiler:
Quote:
Line 21: [Warning] Extra tokens at end of #include directive
Line : In function "int main()".
Line 5: 'cout' undeclared (first use this function)
Line 5: (Each undeclared identifier is reported only once for each function it appears
Line 5: syntax error before ';' token
|
What I don't really get is why the first error is reported on line 21 when I've only done 12 lines of code...
Anyway, I've fidled around with the code but with no apparent success on fixing it. The only way for me to get everything running just fine is if I remove the "using name space std" (and adding the std:: to the proper cout part) bit and the "endl" bit from the "cout" line.
BTW, could you tell me what do STD and int (I know that int is integer, but I don't actually know what it is) stand for? It would make it easyer for me to memorize... I'm aiming at understanding programming instead of memorizing the strings of code... Although that I'll probably learn this in a future lesson, but it would make things easier now.
Thanks again for the help...
