+ 4
Is it possible to get variables declared at runtime itself ?
Variables
6 Réponses
+ 3
As far as I can think, there ist no possibility to declare new variables during the runtime of a program.
Since it is compiled and ready to go.
But more of a question would be, what you would like to do with it after generating it?
+ 3
Miro...I will replace it with an array
+ 2
Pawel be clear
+ 1
switch(number)
{
case 1: pointer_int=new int;
break;
case 2:...
...
}
0
Okay if I got it right, you want to run your program and give it, let us say an int, then convert this int to an array?
If yes you could just write a method, that gets your user input and another method that convert your int. Output should be in the main.
- 1
Dynamic allocation ;-)