Hello Cprogramming,
I've got some code which I want to run for floats and doubles. Now I can make two functions like this:
but then I got duplication of code. Is there any nice way to get this done in C without duplication of code?Code:void some_func_f(float f) { /* code */ }
void some_func_d(double d) { /* same code */ }