What you want is something like this:
Code:
std::string str = "hello world";
for (std::string::iterator it = str.begin(); it != str.end(); ++it)
{
printf("%.2X", *it);
}
__________________
Had I the heavens’ embroidered cloths,
Enwrought with golden and silver light,
The blue and the dim and the dark cloths
Of night and light and the half light,
I would spread the cloths under your feet:
But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.