It's class member initializer. It's used to assign value to variables in constructor.
someClass(float _x, float _y):x(_x),y(_y){};
is like,
1 2 3 4
|
someClass(float _x, float _y){
x = _x;
y = _y;
}
|
Last edited on
Thank you very much, lsk!=]
Note:
someClass(float _x, float _y)
is not a default constructor.
A default constructor is one that takes no arguments.
Last edited on