I'm wanting to create a function that accepts a format, "%d" or "%s" or etc.. (for example), and a value, then this function converts the value to a string. So, something like this:
int my_func(char* fmt, ?value?) {
char* str;
sprintf(str,fmt,value);
return;
}
How can I do this? What do I declare for "value" in the call? OR, is this even possible??
Thanks in advance!!!
int my_func(char* fmt, ?value?) {
char* str;
sprintf(str,fmt,value);
return;
}
How can I do this? What do I declare for "value" in the call? OR, is this even possible??
Thanks in advance!!!