i am having a problem in my function, i need someone to explain or fix my problem.
and r my arrays correct.
#include<iostream>
#include<iomanip>
using namespace std;
void display_draw(int mega[12][6], int draw_index);
int main()
{
//int i;
const int NUMROWS=12;
const int NUMCOLS=6;
int draw_index;
int val[NUMROWS][NUMCOLS]={ 5,14,16,39,51,34,
1,20,22,29,41,35,
1,3,12,19,20,28,
1,22,33,43,52,36,
8,14,22,39,50,44,
10,22,36,50,53,39,
11,17,25,36,42,13,
5,14,25,47,49,36,
8,9,14,38,44,36,
3,5,15,43,51,11,
8,9,43,44,54,27,
4,19,24,32,54,5};
cout<<"please put in row"<<endl;
cin>>draw_index;
display_draw(val,draw_index);
return 0;
}
void display_draw(int mega[12][6], int draw_index)
{int i;
for(i=0;i<mega[12];i++)
{
if(mega[i]==draw_index)
cout<<endl;
}
return;
}