Re: iostream cin problem
Active8 wrote:
:: On Aug 19, 3:28 pm, "BobR" <removeBadB...@worldnet.att.net> wrote:
::: Active8 <mike....@gmail.com> wrote in message...
:::
:::: When I enter a valid number and hit return, the cursor just goes
:::: to a new line, nothing else happens, I can't enter anything
:::: after that , and have to ctrl-c kill the prog?
:::
:: <snip>
:::
::
:::: Using cin as opposed to std::cin couldn't have adverse effects,
:::: could it?
:::
::: It should not compile. Turn up the warning level of your compiler.
::
:: warnings do not a failed compile make IMO, but I get you.
::
:: cin (no wonder it's used alone in the first c++ book I read. The
:: author must have learned c first and isn't half the coder you are?
:: wish I had my c/c++ ref. handy)
::
:: cin did compile and still does after the header changes unless I've
:: another include that's now free of the inclusion guards. I'll
:: check.
::
:: But std::cin does work now.
:::
::: Try those 'fixes', and post back here.
::
:: Lots of warnings about stuff not in the brainbench certification
::
:: char mybits;
:: char operator ^ (char rhs) {return myBits ^ rhs;} // was warning
You cannot define operators for built-in types like char. They are
predefined.
:: prior to the include file changes. The xor forces an implicit cast
:: of myBits to int, IIR[or assume]C ? Wonder why I no longer need
:: that protection from myself. Is the c++ include checking to make
:: sure there's no possibility of data loss?
::
:: I like this one from <XMEMORY>:
::
:: ... INCLUDE\xmemory(39) : warning C4100: '_P' : unreferenced formal
:: parameter
::
:: microsoft's own code creates warnings from an include of an
:: include of who knows how many included cludes (or is it "kludge"?)
:: nah... it must be me.
Yes, it's you - for using an ancient compiler. :-)
The warnings in standard headers were fixed in VS2002, that's over 5
years ago.
After you security update your OS, you might consider getting a recent
C++ compiler. Visual C++ Express, for example, has an exceptional
price/performance ratio.
Bo Persson