who can tell me why C++ does not support a void reference but support a void pointer
I think if we could use void reference, it could make many things much easier and bring much flexibility.
But it must be initialized when you declared it. Why C++ does not support it ?
It's in the definition of void.
By definition there can't be a void variable and thus can't be a void refference to a void variable.
'void' when used as a function return type means the function returns nothing.
'void' when used as a function parameter means that the function takes no parameters.
'void' when used as a pointer type means that the pointer type is a universal pointer but can not be derrefferenced without having first been cast to a specific and different type of pointer.