In a class say:

```
class X
{
     int _top;
     vector<int> _stack;
public:
     X() { } // SOME CONSTRUCTOR
};

```

Why does a constructor of this form works:

```
X( int capacity )
     : _stack( capacity ), _top( 0 ) { }

```

But these do not work:

1.

```
X( int capacity )
{ _stack( capacity );  _top=0; }

```

2.

```
X( int capacity )
     {_stack = capacity;  _top=0;}

```

Please Explain.