Hi,
Kindly see the snippet below
In this p is constant and not the value pointed to by p;Code:typedef int *ptr; const ptr p;
Suppose if we want to make the value pointed to by p, a constant, what is to be done?
Regards,
thelink123
Hi,
Kindly see the snippet below
In this p is constant and not the value pointed to by p;Code:typedef int *ptr; const ptr p;
Suppose if we want to make the value pointed to by p, a constant, what is to be done?
Regards,
thelink123
Last edited by thelink123; 07-24-2009 at 01:29 AM. Reason: Not the explantion, but the work around that is required
I believe your only choice is to change the typedef or create a new typedef or not use it:
Code:typedef const int *ptr; ptr p;
Thanks cwr