initializer's list

what's the difference between:
1- return type function-name(): w(0), h(0) { //definition goes here }
2- return type function-name() { w(0); h(0) }
being w,h data members of a certain class, and the function a member function?
The first directly initializes the object.
The second may or may not involve the use of a copy constructor (over which you have no control).

The function-name, BTW, must be a constructor.

Hope this helps.
Topic archived. No new replies allowed.