Click here to Skip to main content
15,906,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Accessing Parallel Port Pin
Roger Allen14-Nov-03 6:14
Roger Allen14-Nov-03 6:14 
GeneralFast picture drawing Pin
Ares214-Nov-03 6:09
Ares214-Nov-03 6:09 
GeneralRe: Fast picture drawing Pin
JWood14-Nov-03 9:39
JWood14-Nov-03 9:39 
GeneralRe: Fast picture drawing Pin
Ares214-Nov-03 21:29
Ares214-Nov-03 21:29 
GeneralRe: Fast picture drawing Pin
Mike Nordell14-Nov-03 19:09
Mike Nordell14-Nov-03 19:09 
GeneralPlatform SDK on VC6 Pin
armentage14-Nov-03 5:00
armentage14-Nov-03 5:00 
GeneralRe: Platform SDK on VC6 Pin
Steve S14-Nov-03 5:26
Steve S14-Nov-03 5:26 
GeneralSimple question Pin
Mathias S.14-Nov-03 4:45
Mathias S.14-Nov-03 4:45 
GeneralRe: Simple question Pin
valikac14-Nov-03 5:18
valikac14-Nov-03 5:18 
GeneralRe: Simple question Pin
Mathias S.14-Nov-03 5:30
Mathias S.14-Nov-03 5:30 
GeneralRe: Simple question Pin
Joe Woodbury14-Nov-03 5:37
professionalJoe Woodbury14-Nov-03 5:37 
GeneralRe: Simple question Pin
Ravi Bhavnani14-Nov-03 6:07
professionalRavi Bhavnani14-Nov-03 6:07 
GeneralRe: Simple question Pin
Tim Smith14-Nov-03 6:19
Tim Smith14-Nov-03 6:19 
GeneralRe: Simple question Pin
Ravi Bhavnani14-Nov-03 6:25
professionalRavi Bhavnani14-Nov-03 6:25 
Generaldocument timing Pin
Tony Teveris14-Nov-03 4:41
Tony Teveris14-Nov-03 4:41 

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.