If the type of a variable must be determined as runtime in C but the variable name is fixed and given, is there any way to reuse the code that involves the variable?
Actually I am asking about the C counterpart situation of runtime determine type for C++.
If possible please give some examples.