I'm trying to make a function that takes a character, then returns a pointer to a function depending on what the character was. I just am not sure how to make a function return a pointer to a function.
int f(char) { return 0; } int (*return_f())(char) { return f; }
No, seriously, use a typedef :)
1.4m articles
1.4m replys
5 comments
57.0k users