cout<<std::hex<<dec;
I want to store it to an int in the form of 0x...
How do I store that value in an integer instead of printing it out?
cout<<std::hex<<dec;
I want to store it to an int in the form of 0x...
How do I store that value in an integer instead of printing it out?
If you have an integer value, and you want to print it just do the following (in C):
You must not forget, to a machine, there are only 0's and 1's. You just have to define the way you want to print it
In C++:
You can store the value into a string stream first: