Hello guys and gals :)
I admit I don't know whether there is a way to create a dynamic array of objects. I have a task to read a file with the structure:
body_id x_low x_high y_low y_high z_low z_high
body_id x_low x_high y_low y_high z_low z_high
body_id x_low x_high y_low y_high z_low z_high
where <body_id> is a string and the rest are integers(coordinates).
So depending on the body_id, I want to make an array of objects of the class Body with each object having the name <body_id>, containing the coordinates, BUT I want
to do it on the first reading of the file. I read the string, check if the name is among Body array, if it is I add the new coordinates to the Body object, but if it isn't I want to create a new Body object to the array, how do I do it without making a list?