Using MS Visual Studio 17.2.5, I declared std::string vc = "test";
.
In a debug session, I obtained the address of this string via &vc
- e.g. 0x008FF8C4,
but if I put this address into the Debug Memory window then I see that my string is stored with an offset from the obtained address, like this:
0x008FF8C4 *30 9a b1 00* **74 65 73 74 00** cc cc cc cc cc cc cc cc cc cc cc
String representation of this sequence is 0љ±.test
.
This means that the string ("test" is encoded to 74 65 73 74 00
sequence) is stored somehow with a bit offset from initially obtained address of her location.
I expected that proper address would be 0x008FF8C8 (+4) that points me exactly to this string.
I can't figure out why the address of variable is wrong? Please advise what "30 9a b1 00" means.