How do I get this to work? I am not sure how many invoices a customer will be assigned to and want to leave it dynamic. Please help.
#include #in
You can change invoices to int** invoices and then allocate dynamically using malloc(). You can allocate a 2D array like this:
invoices
int** invoices
malloc()
int** theArray; theArray = (int**) malloc(arraySizeX*sizeof(int*)); for (int i = 0; i < arraySizeX; i++) theArray[i] = (int*) malloc(arraySizeY*sizeof(int));