18 Dec
2006
18 Dec
'06
5:13 p.m.
Dear All,
This does what I want:
uint8_t i = 65;
printf("i = %d\n",i);
It prints "65". This doesn't:
uint8_t i = 65;
cout << "i = " << i << "\n";
It treats i as a char, since uint8_t is a typedef for char deep in some
header file somewhere, and prints "A".
I was hoping that boost::format would do what I wanted:
uint8_t i = 65;
cout << boost::format("i = %d\n") % i;
But it seems to have the same, unwanted, behaviour as cout<