Mega Code Archive
Use the setiosflags( ) manipulator to directly set the various format flags related to a stream
#include
#include
using namespace std;
int main()
{
cout << setiosflags(ios::showpos);
cout << setiosflags(ios::showbase);
cout << 123 << " " << hex << 123;
return 0;
}