Reputation: 1108
I'm using boost::format to create and format a string.
I would like to create following output:
Data: 0x64 - Name: 'xxx', Value: 10
I tried it with following line:
boost::format("Data: %|02x|%1% - Name: '%2%', Value: %3%") % code % name % value);
but it doesn't work.
I know that the formation of the first parameter is wrong, but I am not able to fix it.
Is there a possibility to print the first parameter as hex?
Upvotes: 5
Views: 8740