What is c++ verison of %p?
I''m trying to print the address of a pointer to a string''s individual characters, but I can only get ascii data using cout << &(str[0]);
Using printf("%p", &(str[0]) will give the address. How can I achieve this in c++? Thank you for any help.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement