Is it possible to instantiate a class inside of a for loop and continue to make a new instance of the class as I iterate threw the for loop?
Also can you have multiply instances with the same name but if I pass in different values in the Constructor, will all of the instances exist with the same name but with different values or will it keep over writing it self?
Can I create a string and then create an instance of animal with the variable/name of the string?
Is this possible below.
class animal {
};
string bob;
bob animal();
Also can you have multiply instances with the same name but if I pass in different values in the Constructor, will all of the instances exist with the same name but with different values or will it keep over writing it self?
Can I create a string and then create an instance of animal with the variable/name of the string?
Is this possible below.
class animal {
};
string bob;
bob animal();