Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
A simple output manipulator: sethex
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
|
||||
ostream &sethex(ostream &stream)
|
||||
{
|
||||
stream.setf(ios::showbase);
|
||||
stream.setf(ios::hex, ios::basefield);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
cout << 256 << " " << sethex << 256;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user