Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #8871

Re: How to creat function to call eg int function1(int, ...)

From Nobody <nobody@nowhere.com>
Subject Re: How to creat function to call eg int function1(int, ...)
Date 2011-08-15 19:25 +0100
Message-Id <pan.2011.08.15.18.25.07.960000@nowhere.com>
Newsgroups comp.lang.c++
References <a2e05ab3-f8f0-481f-abf2-35cdd422d934@fv14g2000vbb.googlegroups.com> <j23ugp$n6o$1@dont-email.me> <4e481180$0$2874$7b1e8fa0@news.nbl.fi> <j2b4mb$af7$1@dont-email.me> <4e492039$0$2807$7b1e8fa0@news.nbl.fi>
Organization Zen Internet

Show all headers | View raw


On Mon, 15 Aug 2011 13:33:45 +0000, Juha Nieminen wrote:

>   va_list is part of the C89 standard, yet you claim there is no portable
> way.

Read the original question:

> But I also have functions with variable arguments like this:
> extern int function2(int, ...)
> 
> So how can I write my own function which calls that?

To which, the answer is "there is no portable solution". If the OP was
writing the function, he could just write a va_list based version. But if
all he has is a variadic function, there's no portable way to "wrap" it
(i.e. write a function which is itself variadic and which passes those
arguments down to the original function).

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to creat function to call eg int function1(int, ...) Angus <anguscomber@gmail.com> - 2011-08-12 11:58 -0700
  Re: How to creat function to call eg int function1(int, ...) Victor Bazarov <v.bazarov@comcast.invalid> - 2011-08-12 15:22 -0400
    Re: How to creat function to call eg int function1(int, ...) Juha Nieminen <nospam@thanks.invalid> - 2011-08-14 18:18 +0000
      Re: How to creat function to call eg int function1(int, ...) Victor Bazarov <v.bazarov@comcast.invalid> - 2011-08-15 08:50 -0400
        Re: How to creat function to call eg int function1(int, ...) Juha Nieminen <nospam@thanks.invalid> - 2011-08-15 13:33 +0000
          Re: How to creat function to call eg int function1(int, ...) SG <s.gesemann@gmail.com> - 2011-08-15 06:41 -0700
          Re: How to creat function to call eg int function1(int, ...) Nobody <nobody@nowhere.com> - 2011-08-15 19:25 +0100
            Re: How to creat function to call eg int function1(int, ...) Juha Nieminen <nospam@thanks.invalid> - 2011-08-16 07:36 +0000
  Re: How to creat function to call eg int function1(int, ...) "Alf P. Steinbach" <alf.p.steinbach:usenet@gmail.com> - 2011-08-12 21:35 +0200

csiph-web