/*unspecified*/ setbase (int base);
setf(which,ios_base::basefield) were called on the stream on which it is inserted/extracted as a manipulator, with which being:<iomanip> .| base argument | same as inserting... |
|---|---|
8 | oct |
10 | dec |
16 | hex |
| any other | resetiosflags(ios_base::basefield) |
1
2
3
4
5
6
7
8
9
// setbase example
#include <iostream> // std::cout, std::endl
#include <iomanip> // std::setbase
int main () {
std::cout << std::setbase(16);
std::cout << 110 << std::endl;
return 0;
}
6e