I have trouble getting my dynamic int array to work properly. I have tried some examples but still can not get it to work. I think I am doing a minor pointer problem but I cannot figure out what. I want to have a dynamic int array and then from another function add numbers to this array. I have gotten the counter to work.

I have tried putting `*` at different places and trying my way but I am at this point lacking the knowledge to actually know where the `*` should be. I know some basics about `&` and `*` but apparently not enough

```
static void counterFunction(int* pointerToArray[], int* count)
{
    while (*count < 10) {
        *(*pointerToArray + *count) = *count;
        *count = *count + 1;
    }
}

static int* writeSortedToArray(void)
{
    // I need to store 1000 numbers at this point
    int* dynamicArray = malloc(1000 * sizeof(int));
    int counter = 0;

    counterFunction(&dynamicArray, &counter);

    return 0;
}

```

The counter works properly, the dynamic array does not work at all. It only store a 0 according to my debugger (xcode)