1

If a class has a constructor with the arguments as defined below

class myclass
{
    public:
        myclass(int a, int b)
        {
            cout << a << b << endl;
        }
};

can anybody please let me know the differences between the 2 forms of object instantiation as mentioned below.

myclass ob(2, 3);
myclass ob = myclass(2, 3);
kadina
  • 5,042
  • 4
  • 42
  • 83

0 Answers0