Hi guys does default value for function prototypes are available in C. int func(int i=5); always give me a error saying there must be ';' ',' or ')' before '='
I don't believe C has that feature. You could probably use a struct as a hack but you'd still need to pass one in as an argument. Code: typedef struct { int def_val; } foo; void bar(foo *t) { // do something with t->def_val } int main(void) { foo test = { 5 }; bar(&test); ... } There's some complicated stuff over at stackoverflow if you're interested in giving that a try.