Quote:
Originally posted by Uraldor
Coz if you do this:
int i = 0;
then i's constructor receives 0 as a parameter and it's initialised with that value.
if you do this:
int i;
i = 0;
i is constructed, and after that happens the assignment operator is called for i, so instead of just one function, there's two being called.
So, if you can, use the first method, not the second.
U.
but......it seems nothing serious happens if I declare a variable in 2 lines. does it cause any unexpected errors ? :rolleyes: