Referring to the sample code above, what is the ....

Q

Sample Code
class HasStatic {
static int I;
};
Referring to the sample code above, what is the
appropriate method of defining the member variable "I",
and assigning it the value 10, outside of the class declaration?

1 int static I = 10;
2 int HasStatic::I = 10;
3 HasStatic I = 10;
4 static I(10);
5 static I = 10;

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-05-04, 3260👍, 0💬