Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Stupid Algebra Question Pin
Waldermort10-Mar-07 0:44
Waldermort10-Mar-07 0:44 
GeneralRe: Stupid Algebra Question Pin
Joel Holdsworth10-Mar-07 0:49
Joel Holdsworth10-Mar-07 0:49 
GeneralRe: Stupid Algebra Question Pin
Waldermort10-Mar-07 0:58
Waldermort10-Mar-07 0:58 
GeneralRe: Stupid Algebra Question Pin
toxcct10-Mar-07 2:56
toxcct10-Mar-07 2:56 
AnswerRe: Stupid Algebra Question Pin
Stephen Hewitt10-Mar-07 17:11
Stephen Hewitt10-Mar-07 17:11 
AnswerRe: Stupid Algebra Question Pin
cp987610-Mar-07 17:38
cp987610-Mar-07 17:38 
Questionstring arguments Pin
Kiran Pinjala10-Mar-07 0:05
Kiran Pinjala10-Mar-07 0:05 
AnswerRe: string arguments [modified] Pin
Newbie0010-Mar-07 0:10
Newbie0010-Mar-07 0:10 
I've to admit, I don't understand your problem. Strings are passed to functions like everything else ...

string strArr;<br />
<br />
AddItem(unsigned short*,string StrToPass);


If you are passing different strings number you should try to pass array of strings defined dynamically.

AddItem(unsigned short*,string *StrToPass,int Size); //f. declaration<br />
string *strArr; //pointer to the strings declaration<br />
.<br />
.<br />
.<br />
int Size=30; //string Array's Size<br />
.<br />
.<br />
.<br />
strArr = new string [Size]; //allocating new array of strings<br />
.<br />
.<br />
.<br />
AddItem(...,strArr,Size); //passing string's array to the function <br />
                          //with it's actual size<br />
.<br />
.<br />
.<br />
delete [] strArr; //if you don't need the array you have to delete it <br />
    //and allocate a new one with different size<br />
strArr=NULL;  //setting the pointer to NULL for safety after <br />
              //deleting it

Using dynamic arrays is similar to static arrays, you can also use
pointer notification instead of f.e. strArr[2] in order to increase program's speed.

Does it solve your problem?



-- modified at 6:24 Saturday 10th March, 2007
GeneralRe: string arguments Pin
Kiran Pinjala10-Mar-07 1:09
Kiran Pinjala10-Mar-07 1:09 
GeneralRe: string arguments Pin
Waldermort10-Mar-07 1:28
Waldermort10-Mar-07 1:28 
GeneralRe: string arguments Pin
Newbie0010-Mar-07 2:30
Newbie0010-Mar-07 2:30 
AnswerRe: string arguments Pin
Mark Salsbery10-Mar-07 7:09
Mark Salsbery10-Mar-07 7:09 
Questionauto run a mfc program Pin
prathuraj9-Mar-07 22:30
prathuraj9-Mar-07 22:30 
AnswerRe: auto run a mfc program [modified] Pin
Eytukan9-Mar-07 23:54
Eytukan9-Mar-07 23:54 
GeneralRe: auto run a mfc program--but what i need is Pin
prathuraj10-Mar-07 0:07
prathuraj10-Mar-07 0:07 
GeneralRe: auto run a mfc program--but what i need is Pin
Waldermort10-Mar-07 0:25
Waldermort10-Mar-07 0:25 
GeneralRe: auto run a mfc program--but what i need is Pin
prathuraj10-Mar-07 0:41
prathuraj10-Mar-07 0:41 
GeneralRe: auto run a mfc program--but what i need is Pin
Waldermort10-Mar-07 0:42
Waldermort10-Mar-07 0:42 
GeneralRe: auto run a mfc program--but what i need is Pin
jeepoo10-Mar-07 2:34
jeepoo10-Mar-07 2:34 
GeneralRe: auto run a mfc program--but what i need is Pin
Waldermort10-Mar-07 3:10
Waldermort10-Mar-07 3:10 
QuestionRe: auto run a mfc program--but what i need is Pin
Rajesh R Subramanian11-Mar-07 3:03
professionalRajesh R Subramanian11-Mar-07 3:03 
QuestionEmail without SMTP Pin
kk.tvm9-Mar-07 21:21
kk.tvm9-Mar-07 21:21 
QuestionRe: Email without SMTP Pin
Hamid_RT11-Mar-07 5:59
Hamid_RT11-Mar-07 5:59 
Questionwindows autorun Pin
jeepoo9-Mar-07 20:23
jeepoo9-Mar-07 20:23 
AnswerRe: windows autorun Pin
G Haranadh9-Mar-07 21:44
G Haranadh9-Mar-07 21: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.