A quadtree data structure implemented using c++