Wizzyglvl3
New Member
- Reaction score
- 0
I just started C++ with a book I got (C++ for DUMMIES ) and I ran into a problem. I already had a problem previous to this with Dev-C++, so i switched users, and installed CodeBlocks. In the book it says to make a code with cout and endl in it, but the build log says that
error 'cout' was not declared in this scope
error 'endl' was not declared in this scope
This is the exact code
I don't know why its doing this, i thought it might be because this might be an outdated style (the book is probably 3 years old) or mabye its because im not using dev-C++, and something was included in the Dev-C++, (I used to do a little bit of html, so kinda like linking CSS pages to an overall HTML page, so it doesnt take up a lot of space and what not) that wasnt included in CodeBlocks
Please somebody help me troubleshoot this and see if there is anything I can do to fix it.
error 'cout' was not declared in this scope
error 'endl' was not declared in this scope
This is the exact code
Code:
#include <iostream>
#include <cstdlib>
int main(int argc, char *argv[])
{
cout << "Hello, I am your computer talking." << endl;
system("PAUSE");
return 0;
}
Please somebody help me troubleshoot this and see if there is anything I can do to fix it.