Like:
class A
{
volatile int i;
};
A a;
My question is that will the entire a become cv开发者_StackOverflow qualified? May be a naive question.
No, all of a will not be volatile. Just as you can have fields of a class that are const without every instance of the class being const, you can have volatile fields that do not make the entire class instance volatile.
加载中,请稍侯......
精彩评论