hello all, i am a beginner, in C++ we declare varables for example just like(int (variable);. and after this we put some value to variable. but i want that system suppose a variables itself and prompt for a variable just like prompts for value.
Jump to Post
If you mean that you want the program to prompt for a variable name, you would also want to prompt for the variable type.
You could use a C++ map to hold the (unique) name and a pointer to the (new) memory (allocated) to hold that type (and type name).
All 3 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.