You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello may I know the difference between cout.setf(cout.hex) and cout.setf(ios::hex) .....? they seem to get me the same output as I tried to format what im printing to hexadecimal. if im not wrong, the ios:: thing is because the function is from a class ios in the header file iostream, that is why a scope resolution operator is used to refer to it. am I right? or is there anything else I need to know?
Guidelines
I have read and understood this category's guidelines before making this post.
Programming HelpDiscussions around programming languages, open source and software development
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Body
hello may I know the difference between cout.setf(cout.hex) and cout.setf(ios::hex) .....? they seem to get me the same output as I tried to format what im printing to hexadecimal. if im not wrong, the ios:: thing is because the function is from a class ios in the header file iostream, that is why a scope resolution operator is used to refer to it. am I right? or is there anything else I need to know?
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions