std :: hex is just a manipulator that sets some formatting flags in a stream. You can get them using ios_base :: flags () and use the result in your <<statement. You should probably also use ios_base :: width and ios_base :: precision.
If you need more settings than provided, ios_base :: xalloc, ios_base :: iword, ios_base :: pword provide a path to extensions for your manipulators and inserts.
Aprogrammer
source share