Q:

C++ Passing a Dynamically Created Array with Pointers

Hoping for a little C++ assistance - I'm very new to the topic. I'm attempting to dynamically create an array based on user input with a pointer, then pass the array to a function. But the pointer (and thus array) pass feels a little wrong because there is no dereferencing that occurs.
During/after passing, do we just treat the pointer as if it were any normally declared-and-passed array, without the need to dereference (*) anything? Or am I applying this incorrectly?
Pseudocode follows:
#include<iostream>
using namespace std;

void arrayFunc(int [], int);    // << Note no indication of pointer pass

int main()
{
    int *arrayPtr = 0; // Array pointer
    int arrayElem = 0; // Number of elements in array

    cout << "\nPlease enter the number of elements: ";
    cin >> arrayElem;

    arrayPtr = new int[arrayElem]; // Dynamically create the new array
    arrayFunc(arrayPtr, arrayElem); // << Note no dereferencing or other indication of pointer

    return 0;
}

void arrayFunc(int array[], int arrayElem)  // << Same here - now it's just a plain old array
{
    // All the functiony-bits go here, referencing array without the need to dereference
}

[EDIT] While the above code works, the following includes the fixes determined in the discussion below:
#include<iostream>
using namespace std;

void arrayFunc(int*, int);  // Changed to pointer pass instead of []

int main()
{
    int *arrayPtr = 0; // Array pointer
    int arrayElem = 0; // Number of elements in array

    cout << "\nPlease enter the number of elements: ";
    cin >> arrayElem;

    arrayPtr = new int[arrayElem]; // Dynamically create the new array
    arrayFunc(arrayPtr, arrayElem);

    return 0;
}

void arrayFunc(int* array, int arrayElem)   // Passing a pointer now instead of []
{
    // All the functiony-bits go here, referencing array without the need to dereference
}

A:

You should pass the pointer in your function, because it describes the situation accurately i.e. you are passing a dynamically allocated memory. arrayPtr is essentially a pointer to the first element of the array. As a result, you do not need to worry about dereferencing it.
Change the function signature to:
void arrayFunc(int*, int);

