im curious if i can conditional create an instance of an object like this
1 2 3 4 5 6 7
if (something == something1)
then use the object functions
any suggestions about choosing a class then a way to create that object depending on what the person chose.
if the input is lets say "warrior"
then in the background the warrior object is initialized.
im trying to avoid initializing all possible classes in the background but only initialize what is picked
i do have warrior class derived from a character class