Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: string arguments Pin
Kiran Pinjala10-Mar-07 1:09
Kiran Pinjala10-Mar-07 1:09 
Thank you for your responce Newbie00.
Newbie00 wrote:
I've to admit, I don't understand your problem.

Let me explain you.
My function
AddItem(char*,...)

takes n number of arguments.

Suppose at runtime i get my total number of values is 2 and the values are "one" and "two" i need to pass those values to the AddItem as
 AddItem("one","two")/pre>
if the number of values are 3 then i need to write as
<pre> AddItem("one","two","three")

and so on...
one solution for this is switch() case statemnt.
switch(noOfVals)
{
 case 1: AddItem(strArr.GetAt(0));
 case 2: AddItem(strArr.GetAt(0),strArr.GetAt(1));
.... and so on
}

but the number of values can not be guessed. So i need to write a logic which may suit to any number of values.

Do you get my problem now?


KIRAN PINJARLA

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 
GeneralRe: windows autorun [modified]-- help me please Pin
jeepoo9-Mar-07 21:58
jeepoo9-Mar-07 21: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.