Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strings Pin
ShilpiP14-Feb-11 22:15
ShilpiP14-Feb-11 22:15 
GeneralRe: Strings Pin
goldenrose914-Feb-11 23:26
goldenrose914-Feb-11 23:26 
GeneralRe: Strings Pin
ShilpiP14-Feb-11 23:29
ShilpiP14-Feb-11 23:29 
AnswerRe: Strings Pin
CPallini14-Feb-11 21:32
mveCPallini14-Feb-11 21:32 
QuestionCorruption of the Heap Error Pin
Foothill14-Feb-11 10:40
professionalFoothill14-Feb-11 10:40 
AnswerRe: Corruption of the Heap Error Pin
David Crow14-Feb-11 11:55
David Crow14-Feb-11 11:55 
GeneralRe: Corruption of the Heap Error Pin
Foothill14-Feb-11 14:26
professionalFoothill14-Feb-11 14:26 
GeneralRe: Corruption of the Heap Error Pin
David Crow14-Feb-11 17:11
David Crow14-Feb-11 17:11 
Foothill wrote:
I'm trying to dynamically resize arrays at runtime


With the CRT, there was the realloc() function. Otherwise, it's not much more difficult, you just have to do more yourself. For example:

int *x = new int[3]; // allocate room for 3 ints
x[0] = 2;
x[1] = 4;
x[2] = 6;
int *y = new int[5]; // allocate room for 5 ints
memcpy(y, x, 3 * sizeof(int)); // copy 3 ints from x to y
y[3] = 8;
y[4] = 10;
delete [] x;

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Man who follows car will be exhausted." - Confucius


GeneralRe: Corruption of the Heap Error Pin
ShilpiP14-Feb-11 19:13
ShilpiP14-Feb-11 19:13 
AnswerRe: Corruption of the Heap Error Pin
ShilpiP14-Feb-11 19:11
ShilpiP14-Feb-11 19:11 
AnswerRe: Corruption of the Heap Error Pin
Niklas L14-Feb-11 21:17
Niklas L14-Feb-11 21:17 
AnswerRe: Corruption of the Heap Error Pin
Stefan_Lang15-Feb-11 6:52
Stefan_Lang15-Feb-11 6:52 
GeneralRe: Corruption of the Heap Error Pin
Niklas L15-Feb-11 10:54
Niklas L15-Feb-11 10:54 
GeneralRe: Corruption of the Heap Error Pin
Stefan_Lang15-Feb-11 22:10
Stefan_Lang15-Feb-11 22:10 
GeneralRe: Corruption of the Heap Error [modified] Pin
Niklas L15-Feb-11 22:37
Niklas L15-Feb-11 22:37 
GeneralRe: Corruption of the Heap Error Pin
Stefan_Lang15-Feb-11 22:51
Stefan_Lang15-Feb-11 22:51 
GeneralRe: Corruption of the Heap Error [modified] Pin
Niklas L15-Feb-11 23:13
Niklas L15-Feb-11 23:13 
GeneralRe: Corruption of the Heap Error Pin
Niklas L16-Feb-11 6:57
Niklas L16-Feb-11 6:57 
GeneralRe: Corruption of the Heap Error Pin
Stefan_Lang16-Feb-11 22:22
Stefan_Lang16-Feb-11 22:22 
GeneralRe: Corruption of the Heap Error Pin
Niklas L16-Feb-11 23:12
Niklas L16-Feb-11 23:12 
GeneralRe: Corruption of the Heap Error Pin
Stefan_Lang17-Feb-11 1:10
Stefan_Lang17-Feb-11 1:10 
GeneralRe: Corruption of the Heap Error Pin
Niklas L17-Feb-11 1:34
Niklas L17-Feb-11 1:34 
GeneralRe: Corruption of the Heap Error Pin
Stefan_Lang17-Feb-11 1:42
Stefan_Lang17-Feb-11 1:42 
GeneralRe: Corruption of the Heap Error Pin
Foothill15-Feb-11 11:16
professionalFoothill15-Feb-11 11:16 
QuestionHow to use CMFCVisualManagerOffice2007 in dialog App? Pin
stephen_young14-Feb-11 3:24
stephen_young14-Feb-11 3:24 

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.