Click here to Skip to main content
15,889,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionShift-jis Pin
samkook8-Nov-05 12:04
samkook8-Nov-05 12:04 
Question(Console C++)Resizing mallocation? Pin
Mariano Lopez-Gappa8-Nov-05 10:44
Mariano Lopez-Gappa8-Nov-05 10:44 
AnswerRe: (Console C++)Resizing mallocation? Pin
Ravi Bhavnani8-Nov-05 11:06
professionalRavi Bhavnani8-Nov-05 11:06 
AnswerRe: (Console C++)Resizing mallocation? Pin
Tim Smith8-Nov-05 11:25
Tim Smith8-Nov-05 11:25 
AnswerRe: (Console C++)Resizing mallocation? Pin
douglasjordan8-Nov-05 12:57
douglasjordan8-Nov-05 12:57 
AnswerRe: (Console C++)Resizing mallocation? Pin
Mariano Lopez-Gappa8-Nov-05 13:17
Mariano Lopez-Gappa8-Nov-05 13:17 
AnswerRe: (Console C++)Resizing mallocation? Pin
LighthouseJ8-Nov-05 19:30
LighthouseJ8-Nov-05 19:30 
AnswerRe: (Console C++)Resizing mallocation? Pin
David Crow9-Nov-05 2:28
David Crow9-Nov-05 2:28 
Mariano Lopez-Gappa wrote:
thing is that final length is unknown, it could be 1000b as well as it could be 0b.


Is that the only difference? Memory is cheap these days. Unless you are talking about several MB of allocations, just allocate 1KB for each instance and be done with it. Yes, there might be some waste here and there, but that's a whole lot more efficient than reallocating memory.


"Take only what you need and leave the land as you found it." - Native American Proverb


GeneralRe: (Console C++)Resizing mallocation? Pin
Tim Smith9-Nov-05 3:14
Tim Smith9-Nov-05 3:14 
QuestionCrash in try catch block Pin
itkid8-Nov-05 10:24
itkid8-Nov-05 10:24 
AnswerRe: Crash in try catch block Pin
Chris Losinger8-Nov-05 10:41
professionalChris Losinger8-Nov-05 10:41 
GeneralRe: Crash in try catch block Pin
itkid8-Nov-05 10:48
itkid8-Nov-05 10:48 
GeneralRe: Crash in try catch block Pin
Chris Losinger8-Nov-05 10:52
professionalChris Losinger8-Nov-05 10:52 
AnswerRe: Crash in try catch block Pin
David Crow8-Nov-05 11:04
David Crow8-Nov-05 11:04 
GeneralRe: Crash in try catch block Pin
itkid8-Nov-05 11:27
itkid8-Nov-05 11:27 
QuestionRe: Crash in try catch block Pin
David Crow9-Nov-05 2:22
David Crow9-Nov-05 2:22 
AnswerRe: Crash in try catch block Pin
itkid9-Nov-05 4:39
itkid9-Nov-05 4:39 
GeneralRe: Crash in try catch block Pin
David Crow9-Nov-05 6:01
David Crow9-Nov-05 6:01 
AnswerRe: Crash in try catch block Pin
James R. Twine9-Nov-05 7:11
James R. Twine9-Nov-05 7:11 
AnswerRe: Crash in try catch block Pin
Graham Bradshaw8-Nov-05 12:59
Graham Bradshaw8-Nov-05 12:59 
GeneralRe: Crash in try catch block Pin
itkid9-Nov-05 5:00
itkid9-Nov-05 5:00 
AnswerRe: Crash in try catch block Pin
Bob Stanneveld9-Nov-05 0:12
Bob Stanneveld9-Nov-05 0:12 
QuestionReading Files :doh: Pin
RedDragon2k8-Nov-05 9:00
RedDragon2k8-Nov-05 9:00 
AnswerRe: Reading Files :doh: Pin
douglasjordan8-Nov-05 9:12
douglasjordan8-Nov-05 9:12 
GeneralRe: Reading Files :doh: Pin
RedDragon2k8-Nov-05 9:24
RedDragon2k8-Nov-05 9: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.