• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange inheritance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange inheritance?


  • Subject: Re: Strange inheritance?
  • From: Howard Moon <email@hidden>
  • Date: Mon, 15 Mar 2010 14:05:18 -0700



BUT, in Caller::Action, the line marked with [2] calls Base::Func1(), rather than my expected result of Sub::Func1().

Weird. I don't see anything wrong with your code. Is that the exact code you're running, though? Or something you simplified for the email that hasn't been run directly?


If I were debugging this I'd set a breakpoint on the line with your note [2] and examine what's in 'base' and what the generated assembly code for calling Func1 looks like.

When I have had this problem in the past, it's always been because I misspelled the function name in one of the classes, or had a different argument list, so that the function in the derived class was not REALLY an override of the base class version, but a separate function altogether.


-Howard


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Strange inheritance? (From: "Richard L. Aurbach" <email@hidden>)
 >Re: Strange inheritance? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Strange inheritance?
  • Next by Date: How to Inspect Method/Function Args Under GCC 4.2
  • Previous by thread: Re: Strange inheritance?
  • Next by thread: RE: Strange inheritance?
  • Index(es):
    • Date
    • Thread