i have the following code........pls point out my mistakes......the first one is the header file and the second one is the file.........
class array
{
int i, a[100],n,d,t,r,c,e[100][100],f[100][100],s,g[100][100],b[100],j,r1,c1;
char p;
public:
void pro();
void enter();
int arrA(int);
int arrB(int);
int arrAA(int r,int c);
int arrBB(int,int);
void dis();
};
void array::enter()
{ cout<<"Enter the degree of array";
cin>>d;
if(d==1)
{ cout<<"Enter the no of elements you wish to input(less than 100)\n";
cin>>n;
t++;
}
else if(d==2)
{ if(s==0)
{cout<<"\nEnter the no of rows\n";
cin>>r;
cout<<"\nEnter the no of columns\n";
cin>>c;
}
else if(s==1)
{cout<<"\nEnter the no of rows\n";
cin>>r1;
cout<<"\nEnter the no of columns\n";
cin>>c1;
}
else
cout<<"\nWrong";
}
}
int array::arrA(int n)
{
cout<<"Input the elements\n";
for(i=0; i<n; i++)
{
cin>>a[i];
}
}
int array:: arrB(int n)
{
cout<<"Input the elements\n";
for(i=0; i<n; i++)
{
cin>>b[i];
}
}
int array::arrAA(int r, int c)
{
cout<<"Input the elements\n";
for(i=0; i<r; i++)
{ cout<<"\n";
for(j=0; j<c; j++)
cin>>f[i][j];
}
}
int array:: arrBB(int r1,int c2)
{
cout<<"Input the elements\n";
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
cin>>e[i][j];
}
}
}
void array::dis()
{ cout<<"Enter the array u wanna display";
cin>>p;
cout<<"The input array is\n";
switch(p)
{
case'a':
{ for(i=0; i<n; i++)
{
cout<<a[i]<<"\n";
}
}
break;
case'b':
{for(i=0; i<n; i++)
{
cout<<b[i]<<"\n";
}
}
break;
case'e':
{ for(i=0; i<r; i++)
{ cout<<"\n";
for(j=0; j<c;j++)
cout<<f[i][j]<<"\t";
}
}
break;
case'f':
{ for(i=0; i<r1; i++)
{ cout<<"\n";
for(j=0; j<c1;j++)
cout<<e[i][j]<<"\t";
}
}
break;
default:
cout<<"Wrong choice";
}
}
void array:: pro()
{
if(d==1)
{ if(t==0)
arrA( n);
else
arrB(n);
}
else if(d==2)
{
if(s==0)
{ arrAA( r, c);
s++;
}
else
arrBB( r1, c1);
}
else cout<<"Wrong choice";
}
#endif
//source file..
#include"HEADER1.h"
#include<iostream>
int main()
{
array w,l;
w.enter();
w.pro();
w.enter();
w.pro();
w.dis();
w.dis();
system("pause");
return 0;
}
pls help me.....