realloc question
From: Gnum (no-email_at_mail.boo)
Date: 08/15/04
- Next message: Frederic Sakr: "redrawindows don't work in embedded, what can i use?"
- Previous message: Gnum: "Re: virtual constructor / destructor"
- Next in thread: Doug Harrison [MVP]: "Re: realloc question"
- Reply: Doug Harrison [MVP]: "Re: realloc question"
- Reply: Barry Schwarz: "Re: realloc question"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Aug 2004 11:34:12 +1200
Just an exercise:
char* Buffer = (char*)malloc( 1000 );
Let's assume it worked well and we have 1000 bytes in Buffer.
char* ReallocatedBuffer = (char*)realloc(Buffer, 2000);
Let's pretend it failed. ReallocatedBuffer = NULL by definition, I suppose.
Buffer. What is inside of it now?
Is it still pointer to 1000 bytes buffer as it was before?
Thanks in advance for any ideas!
Gnum
- Next message: Frederic Sakr: "redrawindows don't work in embedded, what can i use?"
- Previous message: Gnum: "Re: virtual constructor / destructor"
- Next in thread: Doug Harrison [MVP]: "Re: realloc question"
- Reply: Doug Harrison [MVP]: "Re: realloc question"
- Reply: Barry Schwarz: "Re: realloc question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|