As below:
char* a = "abc"; char* b = "abc";
in debugger, a and b has same address.
How come?
How does visual studio C++ handle strings?
Because you're pointing to static text, and depending on what compiler setting you have, the optimizer notices the strings are the same and combines them.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment