CPLUSPLUSRookie
asked on
Dynamically allocated array using command line arguments
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.