+ 1

Biginner help

Help in c++ I am trying to make a funtion that makes a class and the class name should be string that changes, i was able to make the changing string however i don't know how to set the string to the class, whenever i type : Investor str ; it takes str as the name and not the string, how is it possible to set the class to read the content of the string and not as a name

16th May 2020, 10:27 AM
EAOE
EAOE - avatar
1 ответ
0
I'm a bit of a newb myself. Can I see your code. I'll try my best to help :) If it's a name that's an issue you can use inheritance to have a base class and your derived class can be named whatever you want. It can use the same features as the base class too. Have a look at Virtual functions for more.
16th May 2020, 12:40 PM
Olivia
Olivia - avatar