Q:

incompatible types when assigning to type `'struct LocationArray *[(sizetype)(numberOfLoc)]'` from type 'struct LocationArray *'|

Why am I getting this error?:
incompatible types when assigning to type 'struct LocationArray *[(sizetype)(numberOfLoc)]' from type 'struct LocationArray *'|
in the following line in main()?
 myArray = (LocationArray*)malloc(numberOfLoc*sizeof(LocationArray));

Code:
//structure Location
typedef struct Location{
    char locName[35];
    char locDesc[85];
    float latitude;
    float longitude;
} LocationArray;

 int main()
    {
        printf("How many locations would you like to be inside the array?\n");
        int numberOfLoc = 0; //variable for storing the size of the LocationArray
        scanf("%d", &numberOfLoc); //gets the user input and stores in numerOfLoc

        LocationArray *myArray[numberOfLoc]; //declares a LocationArray with the size of numberOfLoc
        myArray = (LocationArray*)malloc(numberOfLoc*sizeof(LocationArray));

        //Print the menu
        printMenu(&myArray);

        //Free the pointer
        free(myArray);
        return 0;
    }

A:

LocationArray *myArray[numberOfLoc]; should be LocationArray *myArray;.

