PRINT ARRAY

I am trying to print an array using a menu system and select case. how ever when i select the option for display array it just returns the menu system. below are two attempts at displaying the array

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  Putvoid disp(int low,int up )

{
	for(int i=0;i<row;i++)
	{
		for(int c=0;c <col; c++)
		{
			myArray[i][c]=low + rand()% up;
			cout << myArray[i][c] << "";

		}
	}
	 cout <<""<<endl;
}

void print()
{
	for(int rows=0;rows<row;rows++)
	{
		for(int cols=0;cols<col;cols++)
			cout << setw(5) << myArray[rows][cols] << "" ;
		cout << endl;
	} the code you need help with here.
"Something is preventing me from walking to school today. Here is what my school looks like:"

The problem is not with your printing functions, but instead with the code that calls them. Show how you call these functions.
Last edited on
i have managed to get it to print,however it prints all zeros :(
:(
Last edited on
"Something is preventing me from walking to school today. Here is what my school looks like:"


Most accurate description. Couldn't hold the emotion. xD

What's the type of "myArray"? How do you call these print functions?
You print all zeros?

You may have problems on how you initialize your array.
Topic archived. No new replies allowed.