The title may have said enough but I’ll explain it anyway:
My application gets a string like “bool” or “double” from a random data source. What I want using that string is to create an actual object with the type specified in that string.
So a string like “int” will give me a new object of type int.
Is this even possible? I’ve seen some examples that use a switch-case structure, but I’d rather see a function that is already implemented.
Thanks in advance!
If you can form the string to the fully qualified type, you can do this kind of thing…