I know about new
keyword that returns pointer so return type is void*
. My stupid question is that why new
must return void*
instead of void&
? Mean when object created by new
they could return address of that object using address of &
operator.
I know difference between pointer and reference. But at the end we work with pointer instead of reference. Please clear my confusion thanks.