Default values on arguments in C functions and function overloading in C
Posted
by inquam
on Stack Overflow
See other posts from Stack Overflow
or by inquam
Published on 2010-06-07T08:36:20Z
Indexed on
2010/06/07
8:42 UTC
Read the original article
Hit count: 294
Converting a C++ lib to ANSI C and it seems like though ANSI C doesn't support default values for function variables or am I mistaken? What I want is something like
int funcName(int foo, bar* = NULL);
Also, is function overloading possible in ANSI C?
Would need
const char* foo_property(foo_t* /* this */, int /* property_number*/);
const char* foo_property(foo_t* /* this */, const char* /* key */, int /* iter */);
Could of course just name them differently but being used to C++ I kinda used to function overloading.
© Stack Overflow or respective owner