I'm doing some data processing of a large data set in a small C++ app.
As part of this I need to print out (in hex) some long long integer values including leading zeros so that it displays as a full 16 characters of hex (ala 09002724800028be).
I can't quite figure out how to do this with a printf. I'm able to get output with:
But that isn't zero padding at the front-end. The above value would come out starting with 9.
How can I zero pad output (in hex) of a long long?