The little test program below prints out:
And SS Number IS =3039
I would like the number to print out with padded left zeros such that the total length is 8. So:
And SS Number IS =00003039 (notice the extra zeros left padded)
And I would like to know how to do this using manipulators and a stringstream as shown below. Thanks!
The test program:
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
int main()
{
int i = 12345;
std::stringstream lTransport;
lTransport << "And SS Number IS =" << std::hex << i << '\n';
std::cout << lTransport.str();
}