visual c++ - how can is see the state of the error flag? Can I put error state flag in watch? -


i learning c++, beginner question.

the iostream cin has error state error flag goodbit, eofbit, failbit, badbit

can see how change putting them in watch? if have write? if not how can see how error state flags change?

to display flags of cin in watch window while debugging:

enter in watch window:

std::cin.flags() 

or

std::cin.good() 

etc.

but: won't work right away.

the default project configuration links c(++) runtime library dynamically (i.e. using dll). there seems issue debugger/watch have specify context of function if it's defined in dll, see this question.

a quick workaround set project statically link c(++) runtime library; in vs2010 it's under project configuration -> c/c++ -> code generation -> runtime library -> set "multi-threaded debug" (instead of "multi-threaded debug dll").


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -