PHP has variable variables - which allow you to creat variables on the fly. I was wondering is C++ coudl do a similar thing?
For example, if i get a user to input their name, "John". This is saved in the variable UserName.
I then want to create an object of CreateUser, and their name IS the object.
ie. CreateUser John;
But this requires me to have previously set the name for the new object. "CreateUser UserName" is how it should be, but how am i able to access the value of UserName, so that an object called "John" is created and not called "UserName"?