Anyway, one use of pointers is to dynamically allocate space for an array:
void main() {int num = 1;cout << "How many elements: "; cin >> num; if(num < 1) { cout << "It must be above 0!"; return; //end program immediately }int array[num]; //causes about 3 errors in C++int *array = new int[num]; //works - an array size determined at runtimeif(array==NULL) { cout << "Memory unavailable!"; return; }for(int i=0;i<num;i++) //for every element in the array... cin >> array; //...assign it the value you want it to havedelete array; //frees memory, only call once per pointerdelete array; //this second call may crash your program }