Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Korndog

modifiers and classes question

This topic is 6943 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a question that I can''t seem to find in my C++ books. Say I have a class A, and in class A there''s a class B. class B has a couple of ints and chars and whatnot. If I declare an instance of class A volatile, does that make everything inside of its class B volatile, or will I have to specify that again? Sorry if that was confusing, heh...

Share this post


Link to post
Share on other sites
Advertisement
It should render the variables in B volatile too. It''s much the same way that if you declare a const instance of a class it''s members are const as well. Of course that only applies if you access it through the volatile pointer to A.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!