[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: function arguments



This is a multi-part message in MIME format.
hi ,
   there was a recent format bug in wu-ftpd and this was a post in Security Focus.The post details about  format (and specifically
talks about  va_list and printing variables with diff formats..).The attached txt is some sample code for it.hope it helps.just
wondering if u can do this with RTTI in C++.

reg
Ram


Robin Chatterjee wrote:

> check out varargs....look in k&r
> Thanks Robin
>
> deepak yadav wrote:
>
> > hi
> > i posted this problem earlier but i am not receiving any mails from LIP. please help me out.
> >
> > i have to print some values. i don't know before hand what is their type and number which can only be determined when it is run.
> > i want to do something like
> >
> > for(i = 0; i < num ; i++ ) {
> >    str = getFormatSpecifierString(i);
> >    printf(str, value[i]);
> > }
> >
> > is such thing possible. what kind of array 'value' be.
> >
> > thanks
> >
> > -----------------------------
> > reply soon
> > bye
> >
> >  __ deepak __
> >
> > have a great day
> > ICQ 30662394
> > -
> > -
> >
> > This screen intentionally left blank.
> >
> > -----------------------------------------------------------------------
> > For more information on the LIP mailing list see:
> > http://lists.linux-india.org/lists/LIP
>
> -----------------------------------------------------------------------
> For information on this and other Linux India mailing lists check out
> http://lists.linux-india.org/