I need to pass the std::cout to a function so that numbers print in hex and uppercase and 8 digits are printed with 0 fill. I got it to print in hex and uppercase, but I can't figure out the 0 fill. It goes like

Dump(std::cout);

Dump() can't be changed though, so everything I want done has to be set for the stream I'm passing in.

Any ideas?