|
octmanipulator function
<ios> ios_base& oct ( ios_base& str ); Use octal base Sets the basefield format flag for the str stream to oct.When basefield is set to oct, integral numerical values inserted into the stream are expressed in the octal base (radix 8). For input streams, extracted values are also expected to be expressed in the octal base when this flag is set. The basefield format flag can take any of the following values (each with its own manipulator):
The basefield flag is set to dec in standard streams on initialization. Notice that the basefield flag only affects the insertion/extraction of integer values. Floating-point values are always treated in the decimal base. Notice also that no base prefix is implicitly prepended to the number unless the showbase format flag is set. Parameters
Return ValueA reference to the stream object.Example
The execution of this example displays something similar to:
See also
|