Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #14977
| From | jt@toerring.de (Jens Thoms Toerring) |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: what am i doing wrong here?help |
| Date | 2012-03-18 21:04 +0000 |
| Organization | Freie Universitaet Berlin |
| Message-ID | <9sn0umFnu4U1@mid.uni-berlin.de> (permalink) |
| References | <68aa0d2b-6078-495d-abf3-c7dd02148eed@o3g2000pbt.googlegroups.com> <9sm2idFbr3U1@mid.uni-berlin.de> |
Jens Thoms Toerring <jt@toerring.de> wrote:
> naushil mehta <naushil9@gmail.com> wrote:
> > int avgx (int,...)
> > {
> That's a function declaration (but misses a colon at the
> end), a definition would need a named variable. The com-
> piler won't accept this.
Oops, I was thinking C when I wrote that (have been writing C
the last few days) - in C++ you can have unnamed arguments if
you're not goind to use them within the function, so it's a
valid start for a function definition (but one that makes no
sense for a function with a variable number of arguments since
now you can't get at them because there's nothing you could
pass to va_start() as the second argument).
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
what am i doing wrong here?help naushil mehta <naushil9@gmail.com> - 2012-03-17 20:18 -0700
Re: what am i doing wrong here?help jt@toerring.de (Jens Thoms Toerring) - 2012-03-18 12:25 +0000
Re: what am i doing wrong here?help jt@toerring.de (Jens Thoms Toerring) - 2012-03-18 21:04 +0000
csiph-web