How are static variables that are data members of a class initialised??
1
Expert's answer
2017-10-03T15:03:07-0400
In C++, static member variables are initialised to zero once first object of class is created; There is only one instance of this variable for any number of objects of this class; Static variables can't be initialised inside class but they can be initialised outside of class accoding to the format: (data type of varible) (name of class)::(name of varible)= (value);
Comments
Leave a comment