Click here to Skip to main content
15,923,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sound Please?! Pin
DaFrawg16-Nov-03 10:19
DaFrawg16-Nov-03 10:19 
GeneralRe: Sound Please?! Pin
DaFrawg22-Nov-03 1:22
DaFrawg22-Nov-03 1:22 
GeneralDisplaying thumbnails Pin
harsh91114-Nov-03 8:20
harsh91114-Nov-03 8:20 
GeneralRe: Displaying thumbnails Pin
Maximilien14-Nov-03 8:47
Maximilien14-Nov-03 8:47 
GeneralRe: Displaying thumbnails Pin
Ryan_Roberts14-Nov-03 9:44
Ryan_Roberts14-Nov-03 9:44 
GeneralRe: Displaying thumbnails Pin
Michael Gunlock15-Nov-03 14:00
Michael Gunlock15-Nov-03 14:00 
QuestionRight way to size a control to fit window? Pin
Kuniva14-Nov-03 8:14
Kuniva14-Nov-03 8:14 
AnswerRe: Right way to size a control to fit window? Pin
Peter Molnar14-Nov-03 14:02
Peter Molnar14-Nov-03 14:02 
GeneralKeyboard Hook Pin
trendb14-Nov-03 8:09
trendb14-Nov-03 8:09 
GeneralRe: Keyboard Hook Pin
JWood14-Nov-03 9:41
JWood14-Nov-03 9:41 
GeneralRe: Keyboard Hook Pin
trendb14-Nov-03 13:51
trendb14-Nov-03 13:51 
GeneralRe: Keyboard Hook Pin
Alexander M.,14-Nov-03 22:43
Alexander M.,14-Nov-03 22:43 
GeneralCreate a circling text around the button Pin
nhanquy8314-Nov-03 7:42
nhanquy8314-Nov-03 7:42 
GeneralRe: Create a circling text around the button Pin
Maximilien14-Nov-03 7:52
Maximilien14-Nov-03 7:52 
GeneralLoading Directories in tree control in vc++ Pin
harsh91114-Nov-03 6:42
harsh91114-Nov-03 6:42 
GeneralRe: Loading Directories in tree control in vc++ Pin
Michael Dunn14-Nov-03 6:50
sitebuilderMichael Dunn14-Nov-03 6:50 
GeneralRe: Loading Directories in tree control in vc++ Pin
Ravi Bhavnani14-Nov-03 10:47
professionalRavi Bhavnani14-Nov-03 10:47 
GeneralRe: Loading Directories in tree control in vc++ Pin
harsh91114-Nov-03 18:48
harsh91114-Nov-03 18:48 
Generaldelete Pin
Keck14-Nov-03 6:42
Keck14-Nov-03 6:42 
GeneralRe: delete Pin
Michael Dunn14-Nov-03 6:51
sitebuilderMichael Dunn14-Nov-03 6:51 
GeneralRe: delete Pin
Maximilien14-Nov-03 7:26
Maximilien14-Nov-03 7:26 
GeneralRe: delete Pin
Keck14-Nov-03 8:42
Keck14-Nov-03 8:42 
GeneralRe: delete Pin
Tim Smith14-Nov-03 10:40
Tim Smith14-Nov-03 10:40 
You aren't allocating enough memory to hold you data. There really isn't much more than can be said. One of the most common causes is not providing room to store the NULL in a character string.

int nLength = strlen (pszInput);
char *psz = new char [nLength];
strcpy (psz, pszInput);

*BOOM*

it should have been:

char *psz = new char [nLength + 1];

Tim Smith

I'm going to patent thought. I have yet to see any prior art.
GeneralRe: delete Pin
Keck15-Nov-03 8:10
Keck15-Nov-03 8:10 
GeneralAccessing Parallel Port Pin
Pupil_Pa14-Nov-03 6:10
sussPupil_Pa14-Nov-03 6:10 

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.