Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 12:09
mvaMarc Clifton11-Sep-05 12:09 
GeneralRe: C++ question Pin
PJ Arends11-Sep-05 12:35
professionalPJ Arends11-Sep-05 12:35 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 13:48
mvaMarc Clifton11-Sep-05 13:48 
GeneralRe: C++ question Pin
PJ Arends11-Sep-05 19:28
professionalPJ Arends11-Sep-05 19:28 
GeneralRe: C++ question Pin
Christian Graus11-Sep-05 12:46
protectorChristian Graus11-Sep-05 12:46 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 13:49
mvaMarc Clifton11-Sep-05 13:49 
GeneralRe: C++ question Pin
Christian Graus11-Sep-05 13:53
protectorChristian Graus11-Sep-05 13:53 
GeneralRe: C++ question Pin
Nemanja Trifunovic12-Sep-05 2:26
Nemanja Trifunovic12-Sep-05 2:26 
Marc Clifton wrote:
What happened to good ol' realloc?

It is good only for POD types. In this case it would work, but if you have real objects, their destructors would have never been called. Here is a link to BS's FAQ explaining the matter:

Why doesn't C++ have an equivalent to realloc()?[^]


Marc Clifton wrote:
And isn't calling delete[] pointer the wrong thing to do, because that can actually call the destructors on the items in the array

That's exactly why it is a right thing to do - you want your destructors being called before the objects are destroyed - that's the whole point of having them.





My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
GeneralRe: C++ question Pin
Nemanja Trifunovic12-Sep-05 2:30
Nemanja Trifunovic12-Sep-05 2:30 
GeneralC++ question Pin
Sveta8011-Sep-05 7:32
Sveta8011-Sep-05 7:32 
GeneralRe: C++ question Pin
Trollslayer11-Sep-05 7:42
mentorTrollslayer11-Sep-05 7:42 
GeneralRe: C++ question Pin
El Corazon11-Sep-05 7:55
El Corazon11-Sep-05 7:55 
GeneralRe: C++ question Pin
Trollslayer11-Sep-05 13:53
mentorTrollslayer11-Sep-05 13:53 
GeneralRe: C++ question Pin
Blake Miller12-Sep-05 4:38
Blake Miller12-Sep-05 4:38 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 8:03
mvaMarc Clifton11-Sep-05 8:03 
GeneralRe: C++ question Pin
DavidNohejl11-Sep-05 8:09
DavidNohejl11-Sep-05 8:09 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 8:12
mvaMarc Clifton11-Sep-05 8:12 
GeneralRe: C++ question Pin
DavidNohejl11-Sep-05 8:15
DavidNohejl11-Sep-05 8:15 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 8:06
mvaMarc Clifton11-Sep-05 8:06 
GeneralRe: C++ question Pin
nde_plume11-Sep-05 11:42
nde_plume11-Sep-05 11:42 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 12:02
mvaMarc Clifton11-Sep-05 12:02 
GeneralRe: C++ question Pin
nde_plume11-Sep-05 14:15
nde_plume11-Sep-05 14:15 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 15:30
mvaMarc Clifton11-Sep-05 15:30 
GeneralRe: C++ question Pin
Jim Crafton11-Sep-05 8:43
Jim Crafton11-Sep-05 8:43 
GeneralRe: C++ question Pin
Christian Graus11-Sep-05 12:45
protectorChristian Graus11-Sep-05 12:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.