Here the following code was given for implementaion of segtree:
struct segment_tree{
segment_tree *left, *right;
int from, to, value;
segment_tree(int from, int to)
:from(from), to(to), left(NULL), right(NULL), value(0){}
};
What does this line do ?
segment_tree(int from, int to)
:from(from), to(to), left(NULL), right(NULL), value(0){}
Source: T-414-ÁFLV: A Competitive Programming Course | Bjarki Ágúst Guðmundsson

in case of point2 data structure you have to set the X , Y value explicitly
but in case of point you can set these value with just passing the argument
1 Like
I re-indented the code.
segment_tree(int from, int to) // constructor definition
// here starts the initializer list
:
from(from), // initializes `this->from` with `from`
to(to), // initializes `this->to` with `to`
left(NULL), // initializes `this->left` with `NULL`
right(NULL), // initializes `this->right` with `NULL`
value(0) // initializes `this->value` with `0`
{
// body of the constructor
}
You may read more about it here.
Hope this helps. 
1 Like
Thanks for help @ajaymalik and @raisinten. 
1 Like