Why should it write the zero? Do we write 0015? b is just a number, and you're telling your computer to output that number for you.
Use stream manipulators to pad with zeros:
ss<<std::setw(2)<<std::setfill('0');
Setw forces it to print that many characters, and setfill tells it to use that character for padding.
the problem that here i know where i have '0' , but in my work , i have variable i don't know when i will got '0' and when not .
i can have 0x00 or 0x05 or 0x20 .....