I understand that function prototypes do not need to have a name associated with the parameters. For instance:
void foo(int, std::string);
I was interested to know recently that you can do the same in a function definition, though:
void* foo(void*) { std::cerr << "Hello World!" << std::endl; }
Why does this work and how could you use an unnamed parameter? Is there a reason this is allowed (for example, maybe dealing with legacy interfaces or something like that)?
source share