Newbie…
I want to create a dynamicly growing list that will hold Point variables, a couple of int variables and whatever the colour variable is for Argb.
I’m doing it in Visual Studio C++ 2010
What is the best approach to handle this data within the program? It needs to store location, size and colour of objects that the user makes on the screen so I can draw them back to the Form when I refresh the Form. Currently I have a really nice program that draws squares,circles and lines in different colours and I can move that object around but this is only because I’m still holding onto the current object/shape data.
Create a struct or class to hold the information for one shape, and then use an std::vector to hold a list of them.
If all of your shapes can be described by essentially the same data set, with some variance in size of some pieces of data, e.g the number of “Point varaibles” changes from shape to shape, then have a std::vector inside the shape class to hold them that variable data, e.g: