Click here to Skip to main content
16,011,680 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: why is this crashing? CString question Pin
User 66582-Oct-02 10:30
User 66582-Oct-02 10:30 
GeneralRe: why is this crashing? CString question Pin
ns2-Oct-02 10:36
ns2-Oct-02 10:36 
GeneralRe: why is this crashing? CString question Pin
carrie2-Oct-02 10:36
carrie2-Oct-02 10:36 
GeneralRe: why is this crashing? CString question Pin
User 66582-Oct-02 10:45
User 66582-Oct-02 10:45 
Generalthank you! Thank you! Pin
ns2-Oct-02 11:17
ns2-Oct-02 11:17 
GeneralRe: why is this crashing? CString question Pin
Stephane Rodriguez.2-Oct-02 10:40
Stephane Rodriguez.2-Oct-02 10:40 
GeneralRe: why is this crashing? CString question Pin
ns2-Oct-02 10:50
ns2-Oct-02 10:50 
GeneralRe: why is this crashing? CString question Pin
Ravi Bhavnani2-Oct-02 11:52
professionalRavi Bhavnani2-Oct-02 11:52 
ns wrote:
I am just trying to pattern it after a char array

Actually, you're better off using the MFC collection class CStringArray which seems ideally suited for your purpose, since you don't have to worry about freeing up storage, knowing its length, etc. Here's what I mean:
CStringArray arrayOfStrings;
for (long nIndex=0; (nIndex < 4); nIndex++) {
    arrayOfStrings.Add ("abc");
}
myFunction (arrayOfStrings);

...

void myFunction
  (CStringArray& stringArray)
{
   // You have read/write access to "stringArray"
}



/ravi

Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
GeneralRe: why is this crashing? CString question Pin
Anders Molin2-Oct-02 13:44
professionalAnders Molin2-Oct-02 13:44 
GeneralRe: why is this crashing? CString question Pin
TyMatthews2-Oct-02 11:53
TyMatthews2-Oct-02 11:53 
Generalexcellent explanation Pin
ns3-Oct-02 1:14
ns3-Oct-02 1:14 
GeneralRe: why is this crashing? CString question Pin
NormDroid3-Oct-02 7:04
professionalNormDroid3-Oct-02 7:04 
Generalint to CString Pin
ns2-Oct-02 9:58
ns2-Oct-02 9:58 
GeneralRe: int to CString Pin
User 66582-Oct-02 10:22
User 66582-Oct-02 10:22 
GeneralRe: int to CString Pin
ns2-Oct-02 10:28
ns2-Oct-02 10:28 
GeneralCoercing a CFrameWnd to look like a Dialog based app Pin
Anonymous2-Oct-02 9:37
Anonymous2-Oct-02 9:37 
GeneralAdvanced Doc/View question Pin
Jim Crafton2-Oct-02 9:12
Jim Crafton2-Oct-02 9:12 
GeneralRe: Advanced Doc/View question Pin
Daniel Ferguson2-Oct-02 12:46
Daniel Ferguson2-Oct-02 12:46 
GeneralTelephony Pin
SuperGeek2-Oct-02 9:09
SuperGeek2-Oct-02 9:09 
GeneralRe: Telephony Pin
Michael P Butler2-Oct-02 9:24
Michael P Butler2-Oct-02 9:24 
GeneralRe: Telephony Pin
Anders Molin2-Oct-02 13:49
professionalAnders Molin2-Oct-02 13:49 
GeneralRe: Telephony Pin
Michael P Butler2-Oct-02 20:06
Michael P Butler2-Oct-02 20:06 
GeneralRe: Telephony Pin
Anders Molin3-Oct-02 0:05
professionalAnders Molin3-Oct-02 0:05 
GeneralRe: Telephony Pin
Anders Molin2-Oct-02 13:54
professionalAnders Molin2-Oct-02 13:54 
GeneralRe: Telephony Pin
SuperGeek3-Oct-02 15:58
SuperGeek3-Oct-02 15:58 

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.