volatile void * ptr;
Whether ptr is volatile or it points to the volatile location.
So the actual doubt is :
Is the same thing applied to the above declaration as it applied with const qualifier ?
Little explanation will help me a lot.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a pointer to volatile data. If the pointer itself should be volatile but not the data it points at, you’d use:
So yes, it works the same way as the
constmodifier.