1

Possible Duplicate: How Many default methods does a class have?

Given a class as follows:

class ClassA
{
    private:
      int i;
};

I would like to know what functions a compiler will generate for you. Here is my guess:

1> default constructor [ ClassA() ]
2> destructor          [ ~ClassA() ]
3> assignment operator [ ClassA& operator=(const ClassA& rhs) ]
4> copy constructor    [ ClassA(const ClassA& rhs) ]

Do I get it right?

Community
  • 1
  • 1
a2011
  • 257
  • 1
  • 7
  • 13

0 Answers0