Only static and const varibles can be assign to a class ??

Posted by numerical25 on Stack Overflow See other posts from Stack Overflow or by numerical25
Published on 2010-04-27T01:54:07Z Indexed on 2010/04/27 2:03 UTC
Read the original article Hit count: 204

Filed under:
|
|

I am learning c++. Just curious, can only Static and constant varibles be assigned a value from within the class declaration ?? is this mainly why when you assign values to normal members, they have a special way doing it

void myClass::Init():member1(0), member2(1)
{

}

© Stack Overflow or respective owner

Related posts about c++

Related posts about c