I don't know whether this is the right name for what I'm going to ask about. But I see often functions called or implemented in Qt and other programs in a way:
1 2 3 4
my_function(int)
{
...
}
this abstract "int" in the parameter list without variables names I can't understand. How is it used? and what is it? to what extend can it be used? I see it often in slots/signals connect function in Qt!
In connect it is used to tell the type of value a signal will emit and that will be caught by the slot. If the parameter is different than the slot will fail to catch. so for example, this is correct:
I just means that the parameter passed in to the function is unused. Some compilers warn about unused parameters, so its common to leave it unnamed to avoid the warning.