i want to assign an int into an array, but the problem is i dont know what is the index now.
int[] arr = new int[15];
arr[0] = 1;
arr[1] = 2;
arr[2] = 3;
arr[3] = 4;
arr[4] = 5;
that codes work because i know what index i am assigning to,
but what if i dont know the index..
in php i can just do this
arr[]=22;
this will automatically add 22 to the next empty index of array.
but in c++ i cant do that, it gives me compiler error.
so what do you guys suggest ?