This time I am going to point you at two short, interesting articles on const integrity violation which is also applicable to volatile modifier.
Basically it talks about the following feature of C++:
GIVEN
int *i;
const int *p = i; // is allowed
BUT
const int** p = &i; // is not allowed !!
AND
const int*& p = i; // is also not allowed !!
How to fix it?
GIVEN
int *i;
const int *p = i; // is allowed
BUT
const int* const * p = &i; // is allowed !!
AND
const int* const & p = i; // is also allowed !!
FAQ:
http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.17
AND
http://www.gimpel.com/html/bugs/bug1561.htm
Basically it talks about the following feature of C++:
GIVEN
int *i;
const int *p = i; // is allowed
BUT
const int** p = &i; // is not allowed !!
AND
const int*& p = i; // is also not allowed !!
How to fix it?
GIVEN
int *i;
const int *p = i; // is allowed
BUT
const int* const * p = &i; // is allowed !!
AND
const int* const & p = i; // is also allowed !!
FAQ:
http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.17
AND
http://www.gimpel.com/html/bugs/bug1561.htm
Comments
know I will be going to it again! Surfing the internet
hepls me to find blogs that arfe just as good.
Check out the blog site with my coupon 1800contacts in it!
back again! I never get tired of looking for blogs
just like this one.
Come as you are and look at my coupon 1800contacts blog.
again! Websurfing is a good way to find blogs like
yours.
In my spare time I will look for your coupon 1800contacts blog.