Those are array contraints: array have custom size which i will read in top of program, this will be array of pointers to my own class Tree, array need constant read time to every cell.
This is my code which doesn’t work:
scanf("%d %d",&n,&q);
Tree *pointers = new Tree[n];
pointers[0]->value = NULL;
Don’t use
scanf, ever. In C++, use dynamic containers and iostreams:Depending on your setup, it may be preferable to read line-by-line first and then process each line; search this site, as this has been answered a hundred times before.