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

Threaded View

  1. #1

    Is a default constructor with default values is parametric or nonparametric ?

    class A defines default constructor with default values.

    I) Is it default or parameterised constructor?

    My opinion is that it is parametric when it is called with values like A a1(x1,y1) and it is default when it is called like A a2()? Pl suggest.


    Code:
    class A
    {
    int a;
    int b;
    
    public:
    
    A(int x=10,int y=20)
    {
    
    }
    };
    Last edited by forumuser11@gmail.com; August 23rd, 2010 at 04:55 AM.

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