I want to write several functions that are only different in the types of arguments. I know C++ has template to handle this problem well (not very well yet thou
template
I don't think you can do much better than your solution 2 in pure C.