If it is possible to create a vector of class then it should not be an issue to create vector of segment tree in c++.
Can you help me in these two things.
1st) when the size of segment tree at each index is same.
2nd) when the sizes at different indices are different.
Even if you help me solve the 1st thing i will be thankful to you.
It seems that you just want a segment tree encapsulated by a class like this
Thank you so much my friend. I was getting run time error because i was using parameterized constructor instead of init function.
Can we use parameterized constructor somehow?
can you send your code so I can help you debug
Edit: check talks
You can use this. It'll work out of the box for same size segment trees. If you want to add variable size segment trees to it just give the class a default constructor and
emplace_back
the segtrees as required.