Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Polymorphism in C++

Polymorphism in C++

Scheduled Pinned Locked Moved C / C++ / MFC
oopc++delphicomhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gutsyfarid
    wrote on last edited by
    #1

    Sir, I am student of Punjab University College of Information Technology, Lahore, Pakistan I have problem while using Borland C++ v3.1. Problem: ========= The size of an object in virtual inheritance increases 2 bytes Class base { public: int b; base() {} virtual void f() {} virtual void g() {} }; Class derive : virtual public base { public: int d; derive() {} virtual void f() {} virtual void g() {} }; ---------------------- derive d; cout<The object layout in figure is in following URL [OBJECT LAYOUT FIGURE](<a href=) */ The object layout where that extra 2 bytes are laid is drawn in atttchment with v-table layout. Please contact me at! informfarid@yahoo.com

    D 1 Reply Last reply
    0
    • G gutsyfarid

      Sir, I am student of Punjab University College of Information Technology, Lahore, Pakistan I have problem while using Borland C++ v3.1. Problem: ========= The size of an object in virtual inheritance increases 2 bytes Class base { public: int b; base() {} virtual void f() {} virtual void g() {} }; Class derive : virtual public base { public: int d; derive() {} virtual void f() {} virtual void g() {} }; ---------------------- derive d; cout<The object layout in figure is in following URL [OBJECT LAYOUT FIGURE](<a href=) */ The object layout where that extra 2 bytes are laid is drawn in atttchment with v-table layout. Please contact me at! informfarid@yahoo.com

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      mfareed_baig wrote: The object layout in figure is in following URL OBJECT LAYOUT FIGURE I think you better re-check this hyperlink. It is incorrect.


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups