[gmpi] Re: C++ detail question
- From: Jeff McClintock <jeffmcc@xxxxxxxxxx>
- To: gmpi@xxxxxxxxxxxxx
- Date: Thu, 03 Mar 2005 10:01:09 +1300
OK, so second question. If I cast a "struct Foo *" to a "class CFoo *",
what happens? Can I use non-virtual methods on it? Can I use virtual
methods on it?
Obviously, I could not access any data members that are part of CFoo but
not Foo, right?
Well no. Since CFoo inherits from Foo, a pointer to CFoo can access Foo
members (provided they're public of course).
Jeff
----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules: Please stay on topic. You are responsible for your own
words. Please respect your fellow subscribers. Please do not
redistribute anyone else's words without their permission.
Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe
- Follow-Ups:
- [gmpi] Re: C++ detail question
- From: Tim Hockin
- References:
- [gmpi] C++ detail question
- From: Tim Hockin
- [gmpi] Re: C++ detail question
- From: Paul Davis
- [gmpi] Re: C++ detail question
- From: Tim Hockin
Other related posts:
- » [gmpi] C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
- » [gmpi] Re: C++ detail question
OK, so second question. If I cast a "struct Foo *" to a "class CFoo *", what happens? Can I use non-virtual methods on it? Can I use virtual methods on it?
Obviously, I could not access any data members that are part of CFoo but not Foo, right?
---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.
- [gmpi] Re: C++ detail question
- From: Tim Hockin
- [gmpi] C++ detail question
- From: Tim Hockin
- [gmpi] Re: C++ detail question
- From: Paul Davis
- [gmpi] Re: C++ detail question
- From: Tim Hockin