I have a problem. I want to create an integer variable from char array.
Suppose you have an char array char a="Hello World". now i will give you a position like 6 then you have to create int W (W from array).
Please help me.
Talk about metaprogramming. No, what you're asking to do isn't possible in C++. You must create a name for a variable before the program is compiled. You cannot create variables with a specific name at run-time, because those names don't exist at run-time. More importantly, why would you want to create variables of that name? There would be no way to keep track of anything.
It can't be done
Ah, you beat me to it. Pretty much what maeriden said.