Hello, I have a string-related question. If I have a character string, is it possible to define a double-type variable and name it after that character string? I'm asking because I'm using a loop to create several hundred character strings, and I would like to use each string to create a corresponding double variable with the same name. Thanks.
You cannot create variable or symbol names dynamically at run time, they have to be hard coded in the source file.
Grey Wolf's idea of a std::map is a good idea as another way of approaching the problem. It will allow you to give each string a key, or unique identifier that you can search against.