CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 57

Threaded View

  1. #11
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: class constructor question

    EDIT:
    Quote Originally Posted by StGuru
    Why that constructor, when I got other unparamterized?
    Why not that constructor, when that constructor's signature is a match?

    Quote Originally Posted by StGuru
    Why in this code when I pass by value, there isnt invoking of the constructor of class B?
    The copy constructor of B is invoked. Since no copy constructor is declared, the compiler defines it for you.
    Last edited by laserlight; April 27th, 2009 at 12:58 PM.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Tags for this Thread

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