Help answer threads with 0 replies.
Go Back > Blogs > MWH
User Name


Programming on Linux This is about programing techniques of programming languages on Linux distros. For now it's about C++ but in future new languages will be added too.

Why ios::hex and ios::oct Does not Work in C++

Posted 01-27-2010 at 12:45 AM by MWH
Updated 01-27-2010 at 12:59 AM by MWH

Someone might think ios:ct and ios::hex doesn't work in Linux for some unknown reason. The thing is that I have got to know why it's happening. Actually there is no problem, the thing is by default ios::dec turned on in C++. So we have to turn it off by typing cout.unsetf(ios::dec); before our cout statement or cout<<hex<<21323<<endl;.




using namespace...
LQ Newbie
Views 2098 Comments 0 MWH is offline


All times are GMT -5. The time now is 03:58 AM.

Main Menu

Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration