Calling 2-D Array Functions

Based off of this information all I need to know is how to call the functions in main. I know how to fill the arrays with everything I need but I cannot figure out how to call the functions in main. My last post appeared to be hard to understand so I am taking another shot at it with some simpler, more straight forward code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


void   getSales(double[][QUARTERS], int[]);		// places sales figures into the array
void   printSales(double[][QUARTERS], int[]);	// prints data as a table
void   printTableHeading();						// prints table heading

int main()

{	
	double sales[YEAR_COUNT][QUARTERS];	// 2D array to hold the sales transactions
	int years[YEAR_COUNT];				// 1D array to hold the years
	return 0;
}

void printTableHeading()

{
}

void getSales(double salesTable[][QUARTERS],int yearArray[])
{
}

void   printSales(double salesTable[][QUARTERS], int yearArray[])
{
}
Did you have a look at the tutorial section of this site? It has explanations on how to call or define functions.
Having a hard time finding it here on the site. I am having a difficult time because I have a 1-d array and also a 2-d array in my function definitions. I am yet to find an example that shows how to call both types of arrays in a single function.

This is what I am trying right now to no avail.

 
getSales (sales[][QUARTERS], years[] );
Last edited on
Topic archived. No new replies allowed.