array add values for loop c++ code example
Example: how to add elements in an array in for loop c++
int * myVar = new int [5];
for (int i = 0; i < 5; i++)
myVar[i] = i
// 0 1 2 3 4 myVar in the array
// delete stuff *optional*
delete [] myVar;
myVar = NULL;
// free up memory declared on the stack