I have to implement a Union/Find tree in C++. The size of my parent array is to be generic, and I am supposed to pass in the size of the array on the command line, (argv). I have my Union/Find tree in a seperate class, and I am thinking this somehow needs to be done in the constructor.
My question is : How do I dynamically allocate an array of the size specified by the user in the command line?
Thanks in advance for any help