char* ta = new char[4];
int size = strlen(ta);
char* tb = new char[4];
Set a break point and monitor the memory address and context.
+ ta 0x02059318 "????????" char *
+ tb 0x02059358 "????????" char *
size 16 int
That is not what I am expecting. I only allocate 4 char space(4 bytes) for ta pointing to. But it has 8 or more bytes. The interval between ta and tb is 40 in hexadecimal which is 64 decimal. How could I calculate this to byte? and Why I got 16 using strlen? I am using a 64 bit system
If you don't mind please explain it step by step.
Thanks in advance
Jerry