Click here to Skip to main content
15,914,642 members

Comments by GeekyMukesh (Top 1 by date)

GeekyMukesh 14-Oct-18 0:59am View    
Thanks pwasser, for the reply and detailed explanation.
Just wanted to add a information that we should avoid assigning null pointer to reference like below:

int *p=0;
int &q = *p;

This code will compile but the result will be very unexpected, may be segmentation fault.