Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: joelc
  • Order by date
  1. joelc

    Inheritance of a Base class operator=

    Yeeeaaa. I found the solution to my own problem. You have to call the base call like this. I forgot the () the first time. Thanks for the help.. Mystats::operator =(const Mystats &rhs) { // Base class operator= stats::operator = ( rhs ); // This class Operator= w=rhs.w; }
  2. joelc

    Hi, Does anybody know how a get

    I have a subroutine that does this. Of course, I got this somewhere else, but I don't remember where. const char * GetFileName(const char *pszPathName ) { static CString STmp = pszPathName; STmp.MakeReverse(); STmp = STmp.SpanExcluding("\\"); STmp.MakeReverse(); return STmp; }
  3. joelc

    Inheritance of a Base class operator=

    Thank you chpicker for your response, but your code does not use the operator= function, but a predefined copy constructor which is a bit copy of the original object. If you change your line of code Mystats Newstat=mystat; To Mystats Newstat; Newstat=mystat; You will notice that the...
  4. joelc

    Inheritance of a Base class operator=

    Thanks Ian for your quick responce. I have done that before, but I can seem to get the call correct with a operator function. Any ideas.. Thanks again..
  5. joelc

    Inheritance of a Base class operator=

    I have two classes, one is the base class of the other. I would like call “operator = “ from the base class in addition to the new “operator =”. I know I am missing something simple, but I don’t know what. class CAge { public: CAge(); ~CAge(); Cage & operator = (CAge &catmp) {...

Part and Inventory Search

Back
Top