Groups | Search | Server Info | Login | Register
Groups > comp.lang.c.moderated > #505
| From | Jens <jens.gustedt@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c.moderated |
| Subject | Re: How to declare a function parameter to be optional? |
| Date | 2011-02-10 21:40 -0600 |
| Organization | http://groups.google.com |
| Message-ID | <clcm-20110210-0002@plethora.net> (permalink) |
| References | <clcm-20110207-0001@plethora.net> <clcm-20110209-0002@plethora.net> |
On 9 Feb., 19:22, GilNajera <gilnaj...@gmail.com> wrote: > You must set a default value to that parameter when declaring the > function: > > void myFunction(int parameter1, int optional_parameter=23); what you describe is valid C++ but not C. for a form to do such a thing in C, please see my answer. Jens -- comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must have an appropriate newsgroups line in your header for your mail to be seen, or the newsgroup name in square brackets in the subject line. Sorry.
Back to comp.lang.c.moderated | Previous | Next — Previous in thread | Next in thread | Find similar
Re: How to declare a function parameter to be optional? GilNajera <gilnajera@gmail.com> - 2011-02-09 12:22 -0600 Re: How to declare a function parameter to be optional? Jens <jens.gustedt@gmail.com> - 2011-02-10 21:40 -0600 Re: How to declare a function parameter to be optional? David RF <davranfor@gmail.com> - 2011-02-10 21:41 -0600
csiph-web