unsigned char *teta = ....;
...
printf("data at %p
", teta); // prints 0xXXXXXXXX
How can I print variable address using iostream
s? Is there a std::
??? feature like std::hex
to do this kind of conversion (address -> string), so std::cout << std::??? << teta << std::endl
will print that address?
(no sprintf's, please ;))
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…