after inserting the data is not being displayed

#include <iostream>
#include<string>
using namespace std;

struct TTcell
{
string days[5]={"Mon","Tue","Wed","Thur","Fri"};
string Subject[10][10];
string Lecturer[10][10];
string RoomNo[10][10];
string timee[9]={"0(9:00)","1(10:00)","2(11:00)","3(12:00)","4(1:00)","5(2:00)","6(3:00)","7(4:00)","8(5:00)"};
int count=0;
int n,m,z,a,ch;
char c;
string tm;
string dy;
};
int ClearTimetable( TTcell cl)
{


for(int i=0;i<cl.n;i++)
{
for(int j=0;j<cl.m;j++)
{
cl.Subject[i][j]=" ";
cl.Lecturer[i][j]=" ";
cl.RoomNo[i][j]=" ";
}

}
cout<<"\n\n Timetable :\n";

for(int k=0;k<6;k++)
{ cout<<cl.days[k];

for(int i=0;i<cl.n;i++)
{

for(int j=0;j<cl.m;j++)
{

cout<<"\t";
cout<<cl.Subject[i][j];
cout<<cl.Lecturer[i][j];
cout<<cl.RoomNo[i][j];
cout<<"\n";

}

}
}

}
int inserttimetable( TTcell cl)
{


for(int i=0;i<cl.n;i++)
{
for(int j=0;j<cl.m;j++)
{
cout<<"\n"<<i<<"\t"<<j;
cout<<"\nSubject:\n";
cin>>cl.Subject[i][j];
cout<<"\nLecturer:\n";
cin>>cl.Lecturer[i][j];
cout<<"\n RoomNO:\n";
cin>>cl.RoomNo[i][j];
}
}

}
int show(TTcell cl)
{
cout<<"\nEnter Time (0(9:00),1(10:00),2(11:00),3(12:00),4(1:00),5(2:00),6(3:00),7(4:00),8(5:00)):\n";
cin>>cl.tm;
cout<<"Enter Day (Mon,Tue,Wed,Thur,Fri):\n";
cin>>cl.dy;

for(int i=0;i<10;i++)
{
if(cl.timee[i]==cl.tm)
{
cl.z=i;
}
for(int j=0;j<6;j++)
{
if(cl.days[j]==cl.dy)
{
cl.a=j;
}
}
cout<<" \nLecturer,Subject and Room no is:\t";

cout<<cl.Subject[cl.z][cl.a]<<"\t";
cout<<cl.Lecturer[cl.z][cl.a]<<"\t";
cout<<cl.RoomNo[cl.z][cl.a]<<"\n";


}
}

int showtimetable(TTcell cl)
{
cout<<"TIMETABLE:\n";

cout<<"\n";
for(int k=0;k<6;k++)
{
cout<<cl.days[k];
for(int i=0;i<cl.n;i++)
{
for(int j=0;j<cl.m;j++)
{

cout<<"\t"<<cl.Subject[i][j];
cout<<cl.Lecturer[i][j];
cout<<cl.RoomNo[i][j];
cout<<"\n";
}
}
}
}
int main()
{
TTcell cl;
cout<<"\nEnter No of Rows and Coloumns\n";
cin>>cl.n;
cout<<"\n";
cin>>cl.m;
do{
cout<<"Choose the option:\n";
cout<<"1.Clear Timetable\n";
cout<<"2.Insert Timetable\n";
cout<<"3.Show \n";
cout<<"4.Show Timetable\n";
cin>>cl.ch;
switch(cl.ch)
{

case 1: ClearTimetable(cl);
break;
case 2: inserttimetable(cl);
break;
case 3: show(cl);
break;
case 4: showtimetable(cl);
break;
}
cout<<"Do you want to access the menu?\n";
cin>>cl.c;
} while(cl.c=='y'||cl.c=='Y');

}
Topic archived. No new replies allowed.