Is there any way to achieve function overloading in C? I am looking at simple functions to be overloaded like
foo (int a) foo (char b) foo (float c , int d)
I think there is no straight forward way; I’m looking for workarounds if any exist.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are a few possibilities:
printfstyle functions (type as an argument);