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.
ahmediqbal
0
Newbie Poster
Recommended Answers
Jump to PostIf 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 Replies
Reply 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, networking, learning, and sharing knowledge.