Hi all,
Merry X-mas, good holidays to all.
I have a little problem with dynamic memory.
I want to get 4 chars this way:
char *reason = new char [4];
What is weird is that the debugger tells me this:
+ reason 0x009851b8 "ÍÍÍÍýýýý««««««««îþîþîþîþ" char *
then, when I sent 4 chars in reason, they are still more: (using
buffer.copy(reason,buffer.size());
I get:
but I should only get Test. I don't wish to add '\0' at the end, that's the purpose of my pointer.
Thanks to anyone who can help me. (Hope it's clear, cause it's 2 am here, i'm a bit tired).
Thanks all