Re: MFC and c++ problems



>  why it would ever make sense to have the subclass B ever call any method of any class,

Why is that though? I dont see how you can restrict what class B can or
cannot to other classes(ignore the fact that this is a CDialog-child
control relationship). I presume one of the reasons for constructor to
exist is to allow that. Perhaps you meant something else.

-----
Ajay Kalra
ajaykalra@xxxxxxxxx

.



Relevant Pages

  • Best way to set properties that need to be read only
    ... I have a class that has another class as a property, MainClass and SubClass. ... the constructor of the SubClass. ... I know I could make sub class a sruct, but I dont think that is the best ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Virtual functions, calling inherited class. Quicky.
    ... The "SubClass(): BaseClass" syntax is used only for constructors. ... way to indicate which base class constructor to use before entering the ... > I want to call the BaseResult class to let it write shared data before I ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Virtual functions, calling inherited class. Quicky.
    ... The "SubClass(): BaseClass" syntax is used only for constructors. ... way to indicate which base class constructor to use before entering the ... > I want to call the BaseResult class to let it write shared data before I ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Extending/replacing a class without a public constructor
    ... > constructor but bingo, ... > Graphics and just do logging on the calls I care about. ... >> You can subclass either class with an implementation that ... Create an interface which contains the method signatures for ...
    (comp.lang.java.programmer)
  • Re: Base class - Derived class interaction question
    ... Since constructors don't inherit it follows that if you want do this ... at all you /cannot/ use an explicit constructor in the shared code. ... creation of the new object into something that the subclass can override. ... Derived plus(Base operand) ...
    (comp.lang.java.programmer)