From: "Justin Skorupa" Newsgroups: comp.os.msdos.djgpp Subject: Re: cout.setf(ios_base::boolalpha) Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Sat, 16 Oct 1999 18:29:26 -0700 NNTP-Posting-Host: 209.162.42.209 X-Complaints-To: abuse AT thegrid DOT net X-Trace: alfalfa.thegrid.net 940123882 209.162.42.209 (Sat, 16 Oct 1999 18:31:22 PDT) NNTP-Posting-Date: Sat, 16 Oct 1999 18:31:22 PDT Organization: The Grid To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am relatively new to C++. However, I am tutoring myself on the differences of int expressions and bool expressions. The gnu gxx comipler doesn't recognize 'ios_base::boolalpha' argument in the statement 'cout.setf(ios_base::boolalpha)'. I have since learned that the 'ios_base' should be replaced with 'ios' in the current implementation of g++. With what argument do I replace 'boolalpha'? The compiler gives the error that 'boolalpha' is not a member of type 'ios'. obviously, being somewhat new I am at a loss. Please help and thanks in advance! Justin #include using namespace std; int main() { int x; cout << "\nThe expression x = 100 has the value "; cout << (x = 100) << "\n"; cout << "The expression x < 3 has the value "; cout << (x < 3) << "\n"; cout << "The expression x > 3 has the value "; cout << (x > 3) << "\n"; cout.setf(ios_base::boolalpha); cout << "The expression x < 3 has the value "; cout << (x < 3) << "\n"; cout << "The expression x > 3 has the value "; cout << (x > 3) << "\n"; return 0; }