hi all, I'm a beginner - got a book about C++, there's a example of a program but when I type it, I get an error everywhere where "cout" is here's the code maybe you'll know what's wrong (all it says in the message is: `cout'
Code:// booltest - compare variables input from the // keyboard and store the results off //into a logical variable #include <cstdio> #include <cstdlib> #include <iostream> int main(int nNumberofArgs, char* pszArgs[]) { // set output formal for bool variables //to true and false instead //of 1 and 0 cout.setf(cout.boolalpha); // HERE //initialize two arguments int nArg1; cout << "Input value 1: "; // THEN HERE etc cin >> nArg1; int nArg2; cout << "Input value 2: "; cin >> nArg2; bool b; b = nArg1 == nArg2; cout << "The statement, " << nArg1 << " equals " << nArg2 << " is " << b << endl; //wait until the user is ready before terminating the program system("PAUSE"); return 0; }
...I'm using Dev-C++ (came with the booK) if there's any other c++ editors that you'll recommend please let me know