3 ms·
C Constructs That Don't Work in C++
- watergatorman 8y ago"... const int* x_ptr_3 = &x; // (3) ... Finally, we see the preferred approach, which is taking a const pointer (3)" Not a const pointer, but a pointer to const int.
- jalospinoso 8y agoThank you for the correction!
- watergatorman 8y agoJosh Lospinoso, the author of this blog, has now corrected this to read "pointer to const int" C declaration syntax confounds even the experts. I highly recommend this article to all interested in C and C++, and programming languages generally.