CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    5

    Smile question about polymorphism

    I have a question about polymorphism and has been bugging me for ages. The question is

    How dose virtual functions,inheritance and base class pointers provide a mechanisim for polymorphic behaviour?

    Thanks
    not sure if this goes in here?

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: question about polymorphism

    That sounds like a homework question. I'm not sure why that would bug you for ages. There's no shortage of documentation on the web and in bookstores.

  3. #3
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: question about polymorphism


  4. #4
    Join Date
    May 2009
    Posts
    2,413

    Re: question about polymorphism

    The short version is that these mechanisms together allow a base class variable to be safely assigned any derived class object, each which can behave differently.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured