Home

On Aug 19, 12:14 am, "BobR" <removeBadB...@worldnet.att.net> wrote:
> Active8 <mike....@gmail.com> wrote in message...
> > cout << "Hexagram number now enter: ";
> > cin >> hexnum;
>
> 'cout' is not defined. 'cin' is not defined.
> 'operator<<' is not defined.
> 'hexnum' is not defined.
> In other words, you have not posted enough code to determine your problem.
>
> I'll give you an example of what the people in this NG want to see:
>
> #include <iostream>
>
> int main(){
> int hexnum(0);
> std::cout << "Hexagram number now enter: ";
> std::cin >> hexnum;
> std::cout << "\nthe number entered: "<<hexnum<<std::endl;
> // - may need if more input. (ignores next char in buffer) -
> // std::cin.ignore(); // .ignore(2); skips 2 chars, etc.
> // std::cin >> hexnum;
> return 0;
> } // main()
> [ note: when posting, please use spaces, not tabs, when indenting. ]
>
> FAQ http://www.parashift.com/c++-faq-lite
>
> --
> Bob R
> POVrookie


The above example you provided is indicative of the relevant code in
my prog except I might need an ignore() (ok that didn't help.) If
something in the code after the cin is doing it, I wouldn't know where
and to post the whole prog is a lot of tabs to change. cin *does work
elsewhere. Can't run debug 'cause it only fouls up when I'm not in vc+
+ IDE. Remember the really odd thing is that it only screws up when I
run the prog "normally" i.e. not clicking "run" button in VC++? The
program flow is the same either way except the flow stops in the case
of the former 8)

Is it possible that VC++ is preventing a condition (in the stream
buffer?) from occuring?

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?

I'm including iostream via fstream.h and

oh what joy, not. I tried std::cin >> hexnum;

error C2653: 'std' : is not a class or namespace name

Been so long since I saw that I don't remember the fix.

Using cin as opposed to std::cin couldn't have adverse effects, could
it?

Thanks for the link. Great FAQ

Hope we're not chasing a non c++ related rabbit.

Thanks
Mike

previous
next

Re: .hpp
Re: I could use some help making this Python code run faster using
Re: module confusion
Re: Newbee Question
Re: Better program design? (was originally Re: Bug in my C++ program seems really strange. (Update o
Sprzęt RTV i foto
Hotele Poznań
strategie marketingowe
materace promocja
Nokia 6600