Click here to Skip to main content
15,899,634 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: delete and delete [] what is the difference Pin
Michael Dunn22-Feb-01 6:39
sitebuilderMichael Dunn22-Feb-01 6:39 
GeneralRe: delete and delete [] what is the difference Pin
Etienne Danvoye22-Feb-01 7:19
Etienne Danvoye22-Feb-01 7:19 
GeneralRe: delete and delete [] what is the difference Pin
Erik Funkenbusch22-Feb-01 12:47
Erik Funkenbusch22-Feb-01 12:47 
GeneralRe: delete and delete [] what is the difference Pin
Ryan Park23-Feb-01 14:56
Ryan Park23-Feb-01 14:56 
Generalbad arrays .. Pin
Travis D. Mathison22-Feb-01 4:06
Travis D. Mathison22-Feb-01 4:06 
GeneralRe: bad arrays .. Pin
Chris Losinger22-Feb-01 4:49
professionalChris Losinger22-Feb-01 4:49 
GeneralRe: bad arrays .. Pin
l a u r e n22-Feb-01 6:03
l a u r e n22-Feb-01 6:03 
GeneralRe: bad arrays .. Pin
Julien22-Feb-01 15:24
Julien22-Feb-01 15:24 
Where you have:
char *ModuleList[10];
it is NOT an array of strings!!

It is actuall an array of string pointers.
So where you go:
ModuleList[iLoop] = strInput;
what you actually doing is setting all of the string pointers in the array to
point to the same string. The same string that you change every time around
the loop.

So if you really want to store the strings try:
char ModuleList[10][80];
and
(void)strncpy(ModuleList[iLoop], strInput, 80-1);
ModuleList[iLoop][80] = NULL; // to guarentee NULL termination.
// in stead of ModuleList[iLoop] = strInput;

Hope that helps.

Jules
GeneralRe: bad arrays .. Pin
Travis D. Mathison22-Feb-01 16:27
Travis D. Mathison22-Feb-01 16:27 
QuestionDatabase programming?? Pin
22-Feb-01 3:37
suss22-Feb-01 3:37 
GeneralListBox problem ... Pin
Hadi Rezaee22-Feb-01 0:56
Hadi Rezaee22-Feb-01 0:56 
GeneralListCtrl Scrolling Pin
banrio21-Feb-01 23:55
banrio21-Feb-01 23:55 
GeneralResource ID for dynamically created component Pin
nicola21-Feb-01 22:42
nicola21-Feb-01 22:42 
GeneralRe: Resource ID for dynamically created component Pin
l a u r e n22-Feb-01 6:09
l a u r e n22-Feb-01 6:09 
GeneralRe: Resource ID for dynamically created component Pin
Erik Funkenbusch22-Feb-01 12:54
Erik Funkenbusch22-Feb-01 12:54 
QuestionHow to get ip and customer id again!!! Pin
21-Feb-01 21:48
suss21-Feb-01 21:48 
AnswerRe: How to get ip and customer id again!!! Pin
Le Ridder Noir21-Feb-01 22:01
Le Ridder Noir21-Feb-01 22:01 
GeneralDataBase and ATL Pin
ov21-Feb-01 21:42
ov21-Feb-01 21:42 
GeneraliJpeg Image Pin
21-Feb-01 21:38
suss21-Feb-01 21:38 
GeneralRe: iJpeg Image Pin
22-Feb-01 1:46
suss22-Feb-01 1:46 
GeneralHELP! User-defined Msg caused illegal operation at run time Pin
21-Feb-01 19:23
suss21-Feb-01 19:23 
GeneralRe: HELP! User-defined Msg caused illegal operation at run time Pin
Tim Deveaux22-Feb-01 3:45
Tim Deveaux22-Feb-01 3:45 
GeneralWinsock & SOCKS Pin
Amit Jain21-Feb-01 16:28
Amit Jain21-Feb-01 16:28 
QuestionC++ equivalent of C getch()? Pin
21-Feb-01 15:41
suss21-Feb-01 15:41 
AnswerRe: C++ equivalent of C getch()? Pin
Amit Jain21-Feb-01 16:39
Amit Jain21-Feb-01 16:39 

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.