Click here to Skip to main content
16,007,760 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDatagrid Control Pin
rayasam19-Jul-04 18:23
rayasam19-Jul-04 18:23 
GeneralReplacement for strtok Pin
Anthony_Yio19-Jul-04 18:23
Anthony_Yio19-Jul-04 18:23 
GeneralRe: Replacement for strtok Pin
Ivan Cachicatari19-Jul-04 18:47
Ivan Cachicatari19-Jul-04 18:47 
GeneralRe: Replacement for strtok Pin
David Crow20-Jul-04 2:31
David Crow20-Jul-04 2:31 
GeneralRe: Replacement for strtok Pin
Ivan Cachicatari20-Jul-04 4:37
Ivan Cachicatari20-Jul-04 4:37 
Generaladv and disadv of the two following data structures: Pin
kfaday19-Jul-04 17:14
kfaday19-Jul-04 17:14 
GeneralRe: adv and disadv of the two following data structures: Pin
Ryan Binns19-Jul-04 18:00
Ryan Binns19-Jul-04 18:00 
GeneralRe: adv and disadv of the two following data structures: Pin
V.19-Jul-04 21:07
professionalV.19-Jul-04 21:07 
1) static: you can't change the size of your array.
2) dynamic you can create and destroy your array using new and delete.
This comes in quite handy when you need a flexible array

example of the second for a 2 dimensional array:

//make a temporary array<br />
temp = new CString*[nrofrows];<br />
for(int y = 0; y < nrofrows; y++){<br />
    temp[y] = new CString[nrofcols];<br />
    for(int z = 0; z < nrofcols; z++){<br />
        temp[y][z] = "";<br />
    }   //end for<br />
}          //end for


AND (VERY VERY IMPORTANT!)


//delete the temporary array<br />
    for(short x = 0; x < nrofrows; x++){<br />
        delete []temp[x];<br />
    }                                           //end for<br />
    delete []temp;<br />
    temp = NULL;  //so you don not call that address by mistake and there is something else behind it.


hope this helps.

"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
GeneralRe: adv and disadv of the two following data structures: Pin
cmk19-Jul-04 23:18
cmk19-Jul-04 23:18 
GeneralRe: adv and disadv of the two following data structures: Pin
David Crow20-Jul-04 2:40
David Crow20-Jul-04 2:40 
GeneralDetecting Previous instance and closing in console prog Pin
Archer28219-Jul-04 16:42
Archer28219-Jul-04 16:42 
GeneralRe: Detecting Previous instance and closing in console prog Pin
Blake Miller20-Jul-04 11:42
Blake Miller20-Jul-04 11:42 
GeneralStrReplace Pin
Archer28219-Jul-04 16:32
Archer28219-Jul-04 16:32 
GeneralRe: StrReplace Pin
Anthony_Yio19-Jul-04 18:25
Anthony_Yio19-Jul-04 18:25 
GeneralRe: StrReplace Pin
Archer28220-Jul-04 7:44
Archer28220-Jul-04 7:44 
GeneralSTL map with Boost shared_ptr (attempt 2) Pin
tentons19-Jul-04 16:28
tentons19-Jul-04 16:28 
GeneralSTL map with Boost shared_ptr Pin
tentons19-Jul-04 16:24
tentons19-Jul-04 16:24 
GeneralResource Editor Toolbar Pin
floored19-Jul-04 15:09
floored19-Jul-04 15:09 
GeneralRe: HELP!!! Pin
Antti Keskinen19-Jul-04 14:39
Antti Keskinen19-Jul-04 14:39 
GeneralExcel automation (HELP!!!) Pin
daydremer19-Jul-04 14:34
daydremer19-Jul-04 14:34 
GeneralRe: Excel automation (HELP!!!) Pin
Antti Keskinen19-Jul-04 14:38
Antti Keskinen19-Jul-04 14:38 
GeneralRe: Excel automation (HELP!!!) Pin
daydremer19-Jul-04 15:06
daydremer19-Jul-04 15:06 
Generalquestion on use of global scope operator Pin
digwizfox19-Jul-04 14:07
digwizfox19-Jul-04 14:07 
GeneralRe: question on use of global scope operator Pin
Antti Keskinen19-Jul-04 14:20
Antti Keskinen19-Jul-04 14:20 
GeneralRe: question on use of global scope operator Pin
digwizfox19-Jul-04 14:44
digwizfox19-Jul-04 14:44 

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.