Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining

oct (<ios>)

Specifies that integer variables appear in base 8 notation.

ios_base& oct( 
   ios_base& _Str 


A reference to an object of type ios_base, or to a type that inherits from ios_base.

A reference to the object from which _Str is derived.

By default, integer variables are displayed in base 10 notation. dec and hex also change the way integer variables appear.

The manipulator effectively calls _Str.setf(ios_base::oct, ios_base::basefield), and then returns _Str.

See dec for an example of how to use oct.

Header: <ios>

Namespace: std

© 2015 Microsoft