![]() |
Compile error?! Explain somone plz. "Example code of a CD, unchanged"
for some reason i get a compile error on the following.
dont know why, this is an example code from my CD that came with my book i got today. it is supost to work as is, without me chanign anything (witch i havent) but when i go to compile it i get the following error 14 c:\docume~1\kida\desktop\programs\conver~1.cpp `class _IO_ostream_withassign' has no member named `alpha' what the hell is going on? this code is in the book and the example is off the CD, and it gets compile error? plz plz plz explain this, try compileing it yourself. all this code does is look at two number input my th euser, and tells you if they are even by stating true or false. heres the code.. Code:
// BoolTest - compare variables input from the |
The compiler error is saying that the ostream class, which cout is an instance of, doesn't have a member called alpha, which is being used to try to output booleans as the words true or false. Either get a newer version of the iostream classes, or comment out that line.
|
Quote:
and where might i find a newer version of iostream classes???? |
Hmm, maybe your compiler doesn't have support for that particular instance. I Remember how conio.h didn't exist in the SciTE compiler I used, as I'd have to use conio_mingw.h instead. It was strange.
Tinker around with things though. Download multiple compilers and try them. Or do like WetWired said, comment out the line. |
That I couldn't tell you, except to look for a newer version of your C++ standard library package or your toolchain as a whole.
It would be much easier for now to simply comment out that line and use 1 and 0 instead of the words true and false, though if these examples will continue to use the alpha member of cout, getting new libraries may be your only option. |
All times are GMT -6. The time now is 11:58 PM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.