What I would like to do is create a different function that can be called the same way as my clear function which would simply take the paramater, turn around and call the above clear function the same way, but I don't want to have to overload the new function. What type of parameter would my new function have to accept? What would replace the ??? ? Is that even possible?
Also is it possible to have an array which could hold data_fields of both string and int? Then walk through the array and call clearx on each of them?
What do you mean? An array that holds both a string and an int in each element, or an array in which each element can contain either a string or an int? If the former, it can be done with std::pair, or you can make your own struct if you prefer; if the latter, it can be done using generic pointers, but you'll have to keep a second array to encode the type of each element in the first. For example:
Not without polymorphism.
In order to resolve which overload to call, the compiler needs type information at compile time, and generic pointers carry no type information at all. If you try to do something like that, you'll just get a compiler error because no overload takes a void * as a parameter.