Results 1 to 2 of 2

Thread: Question about inheritance and function parameters

  1. #1

    Question about inheritance and function parameters

    Here comes noob question.

    Let's say I have class called TSprite. Now I make child class TAnimatedSprite that inherits from TSprite. Can I use objects of class TAnimatedSprite in functions that ask for TSprite object to be passed?

  2. #2
    Generally yes. It's called polymorphism and is a key property of Object Oriented Programming and Design.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL