I am unable to get this:
as we say int const*ptr; means ptr is a pointer to an const int.
In a example:
int x = 10;
int const*ptr = &x;
//Here *ptr = 12// will give error...
Then if we modify X = 12;// Why there's no error in this case....
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 9 of 9
Thread: Const Pointer Plzzzz HELPThreaded View
|
Click Here to Expand Forum to Full Width |