Click here to Skip to main content
12,633,764 members (32,766 online)

C / C++ / MFC

 
AnswerRe: Problem using MFC to create multiple CDialog threads Pin
Avi Berger21-Feb-10 9:33
memberAvi Berger21-Feb-10 9:33 
GeneralRe: Problem using MFC to create multiple CDialog threads Pin
Member 104740021-Feb-10 11:00
memberMember 104740021-Feb-10 11:00 
GeneralRe: Problem using MFC to create multiple CDialog threads Pin
Spawn@Melmac23-Feb-10 2:59
memberSpawn@Melmac23-Feb-10 2:59 
QuestionBase64 and VC++ Pin
burslem200121-Feb-10 7:08
memberburslem200121-Feb-10 7:08 
AnswerRe: Base64 and VC++ Pin
Rajesh R Subramanian21-Feb-10 7:12
mvpRajesh R Subramanian21-Feb-10 7:12 
AnswerRe: Base64 and VC++ Pin
CPallini21-Feb-10 8:49
mvpCPallini21-Feb-10 8:49 
AnswerRe: Base64 and VC++ Pin
Graham Breach21-Feb-10 10:57
memberGraham Breach21-Feb-10 10:57 
Questiondynamic variable argument list C/C++ Pin
yakabmarci21-Feb-10 5:06
memberyakabmarci21-Feb-10 5:06 
Hello,

I've got a question about variable argument list: Is there a possibility/what would be the best way to call a function with variable arguments, but the number and the type of the arguments is not know at compile time?

You could imagine the problem as follows ( printf is used here for simplicity):
You have an input txt file with the string and a variable number of parameters on each line:
e.g.
"id=%d, name=%s, age=%d" 1 "marci" 100
" a totally different string %d %d %c %x" 1 2 'Y' 10
" there is no rule, this string can be %s" "anything"

You have to use these inputs in the code as parameters for the printf function.
(e.g. for the first line printf("id=%d, name=%s, age=%d",1,"marci",100);

Thank you in advance,
yakabmarci

P.S. The resp. function is available as both as func(n,...) and func(n,va_list p)
AnswerRe: dynamic variable argument list C/C++ Pin
Chris Losinger21-Feb-10 7:11
memberChris Losinger21-Feb-10 7:11 
QuestionConnect to all LAN servers Pin
Manmohan2920-Feb-10 23:36
memberManmohan2920-Feb-10 23:36 
AnswerRe: Connect to all LAN servers Pin
Garth J Lancaster21-Feb-10 0:28
memberGarth J Lancaster21-Feb-10 0:28 
GeneralRe: Connect to all LAN servers Pin
Manmohan2921-Feb-10 1:46
memberManmohan2921-Feb-10 1:46 
GeneralRe: Connect to all LAN servers Pin
Garth J Lancaster21-Feb-10 10:44
memberGarth J Lancaster21-Feb-10 10:44 
AnswerRe: Connect to all LAN servers Pin
emilio_grv22-Feb-10 3:38
memberemilio_grv22-Feb-10 3:38 
GeneralRe: Connect to all LAN servers Pin
Manmohan2922-Feb-10 4:52
memberManmohan2922-Feb-10 4:52 
QuestionVS 2003/2008 or GCC Need To Choose! Pin
Trevor Johansen20-Feb-10 14:02
memberTrevor Johansen20-Feb-10 14:02 
AnswerRe: VS 2003/2008 or GCC Need To Choose! Pin
Nemanja Trifunovic20-Feb-10 17:06
memberNemanja Trifunovic20-Feb-10 17:06 
QuestionAgain KeyBoar dll Pin
devidmorton20-Feb-10 11:59
memberdevidmorton20-Feb-10 11:59 
AnswerRe: Again KeyBoar dll Pin
CPallini20-Feb-10 12:16
mvpCPallini20-Feb-10 12:16 
AnswerRe: Again KeyBoar dll Pin
Trevor Johansen20-Feb-10 13:51
memberTrevor Johansen20-Feb-10 13:51 
GeneralRe: Again KeyBoar dll Pin
devidmorton21-Feb-10 6:26
memberdevidmorton21-Feb-10 6:26 
GeneralRe: Again KeyBoar dll Pin
Trevor Johansen3-Mar-10 20:04
memberTrevor Johansen3-Mar-10 20:04 
QuestionC code in VC Pin
Punima Sen20-Feb-10 6:34
memberPunima Sen20-Feb-10 6:34 
AnswerRe: C code in VC Pin
DavidCrow20-Feb-10 7:12
mvpDavidCrow20-Feb-10 7:12 
AnswerRe: C code in VC Pin
CPallini20-Feb-10 12:15
mvpCPallini20-Feb-10 12:15 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 9 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid