How do you initialize an array which was created in run-time?
With normal arrays, I learned that you can do the following:
But that doesn't seem to work with arrays you create dynamically:Code:int i[10] = {0,};
Is the only way to initialize it passing it through a loop?Code:int* i; i = new int[j]; //j would be some value you got through user input i = {0,};