class Test
{
public:
void Print(int /* arguement*/) // where will it receive, why compiler doesn't throw error
{
std::cout<<"Still Works\n";
}
}; //~ Endls Test Class
void main()
{
Test obj1;
obj1.Print(10); // 10 is passed
}//~ main Ends
Where the parameter will be received in the Test::Print function?
The parameter will still be received by the Print function - however, inside the Print function you will not be able to use it because you have not given it a name.
EDIT:
This concept of not giving function parameter names is useful sometimes.
There are time when you may have to create a function that takes parameters but you are
not going to make use the parameters (I know it sounds strange) - in that case you don't
give the parameter a name - because if you give a parameter a name but do not use it - the compiler
will give a warning that - "variable_name/parameter_name" is not used.
If the variable does not have a name, then the compiler won't give the warning.