that's the syntax to call a function.
Parameters should stand separated as proposed by @jfjlaros
with a bit of work you could use the ellipsis ... to use variable number of parameters.
something like this:
void printText(const char * text) {
Serial.println(text);
}
void renderFF(void (*draw_fn)(const char *), int count, ...)
{
va_list list; // va_list from <cstdarg>. list is its type, used to iterate on ellipsis
va_start(list, count); // Initialize position of va_list
for (int i = 0; i < count; i++) { // Iterate through every argument
draw_fn(va_arg(list, const char *));
}
va_end(list); // Ends the use of va_list
}
void setup() {
Serial.begin(115200);
renderFF(printText, 3, "Hello!", "I am console,", "how are you?");
}
void loop() {}