I want to use some kind of container in cpp to store custom classes. Not existing objects of the classes, but the class as datatype.
sth like:
vector<????>{int,double,string,bool...}
or in my case:
vector<????>{class1,class2,class3 ...}
Eventually I want to iterate through the container to create an object of each class in it:
for(??? c:myVector){
c* tmp = new c();
Edit: I just realized, I would have to store the different object-pointers somewhere to access them later, so even then would have to write every single one manually. That might be the reason, why its not possible to archive. I'm still curious if there is a way, so if you know one, enlighten me please.