Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unicode, Unicode Big Endian or UTF-8? What is the difference? Which format is better to write a text file? Pin
ShilpiP16-Feb-11 19:03
ShilpiP16-Feb-11 19:03 
GeneralRe: Unicode, Unicode Big Endian or UTF-8? What is the difference? Which format is better to write a text file? Pin
jschell17-Feb-11 8:23
jschell17-Feb-11 8:23 
AnswerRe: Unicode, Unicode Big Endian or UTF-8? What is the difference? Which format is better to write a text file? Pin
Nemanja Trifunovic15-Feb-11 7:47
Nemanja Trifunovic15-Feb-11 7:47 
QuestionMFC Rich Edit Control Pin
kamaljagesia14-Feb-11 23:34
kamaljagesia14-Feb-11 23:34 
AnswerRe: MFC Rich Edit Control Pin
Andrew Brock15-Feb-11 2:14
Andrew Brock15-Feb-11 2:14 
AnswerRe: MFC Rich Edit Control Pin
Richard MacCutchan15-Feb-11 2:15
mveRichard MacCutchan15-Feb-11 2:15 
Questionconvert Cpoint to CRect Pin
sarfaraznawaz14-Feb-11 20:22
sarfaraznawaz14-Feb-11 20:22 
AnswerRe: convert Cpoint to CRect PinPopular
Cedric Moonen14-Feb-11 20:28
Cedric Moonen14-Feb-11 20:28 
GeneralRe: convert Cpoint to CRect Pin
sarfaraznawaz15-Feb-11 21:48
sarfaraznawaz15-Feb-11 21:48 
AnswerRe: convert Cpoint to CRect Pin
patelmayur31-May-11 3:09
patelmayur31-May-11 3:09 
QuestionStrings [SOLVED] Pin
goldenrose914-Feb-11 19:24
goldenrose914-Feb-11 19:24 
AnswerRe: Strings Pin
ShilpiP14-Feb-11 19:53
ShilpiP14-Feb-11 19:53 
GeneralRe: Strings Pin
goldenrose914-Feb-11 21:59
goldenrose914-Feb-11 21:59 
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 

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.