Original Post
I''m trying to pass an arbitrary variable with a void pointer to a sprintf function:
setParam(char* filename, char* preset, void* value, char type)
{
char ln[100];
char newline[100];
sprintf(ln,"%s %%%c",preset,type); //result: NEWLINE = %
sprintf(newline,ln,*value); //result: NEWLINE = NEWLINE, with % replaced
However, on the second sprintf it gives a compiler error: "illegal indirection". Is it possible to get the value behind the pointer? How would I do that?
TY