Jump to content
  • Advertisement
Sign in to follow this  
alnite

conversion is inaccesible

This topic is 5060 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

I have Block class that inherits from IKeyboardReader interface. I also have Keyboard class with a function that accepts a reference to IKeyboardReader interface. class Block : public (some other classes), IKeyboardReader; class Keyboard {    void foo( IKeyboardReader& r ); } Now, I tried to pass an instance of Block class to this function but VS.NET 2002 gives me an error saying that conversion exists but is inaccessible. If I typecast it ( (IKeyboardReader&) ), the errors become warnings, but it still displays the same message. Not sure what's going on here.

Share this post


Link to post
Share on other sites
Advertisement
class Block : public (some other classes), public IKeyboardReader;

You must repeat the public keyword in front of every public bases, otherwise they'll be private.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!