[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    realloc question
From:       Szymon Stefanek <stefanek () tin ! it>
Date:       1998-12-30 15:12:03
[Download RAW message or body]

Hi all!

I think that this is a good place to ask :)

char * buffer_ptr = malloc(10);
memmove(buffer_ptr,"1234567890",10);
char * pointer_to_five = buffer_ptr+4;
buffer_ptr = realloc(20);

now buffer_ptr points to the beginning of a 20 bytes buffer like this:
"1234567890**********"

but where points 'pointer_to_five' ? :)
Need some tips...

Szymon Stefanek

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic