We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

setbase

Set base for integers.

T3 setbase( 
   int _Base 
);

_Base

The number base.

The manipulator returns an object that, when extracted from or inserted into the stream str, calls str.setf(mask, ios_base::basefield), and then returns str. Here, mask is determined as follows:

  • If _Base is 8, then mask is ios_base::oct.

  • If _Base is 10, then mask is ios_base::dec.

  • If _Base is 16, then mask is ios_base::hex.

  • If _Base is any other value, then mask is ios_base::fmtflags(0).

See setw for an example of using setbase.

Header: <iomanip>

Namespace: std

Show: