I'm currently creating a text-based RPG, to get myself back into learning C++ again. The problem seems to be with the if-else ladder of statements, the user selects which race they wish to play as, which as a result creates the appropriate object for that race.
When you declare an object within the context of the conditional statement, that object gets destroyed when the conditional code is over (i.e. the closing bracket). The objects you create will only be "visible" within the brackets of the conditional statements, but not outside. Since you're using the same "race" class for all the different races, why not just declare one in a higher namespace (such as the main function, or wherever most of your code is) and then just change the values within the conditional statements to make it match the player's selection?