Help me with the J loop itz suppose to terminate on hitting enter to pass on loop to the outer loop for incrementing row.
I tried a[j]!=(char)13 but it failed.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int no=0,i=0,j,k,m,price[20];
char arr[20][50];
cout<<" ================================================================="<<endl;
cout<<" Food on the run Restaurant "<<endl;
cout<<" Hungry Kay ?? "<<endl<<endl;
cout<<" ================================================================="<<endl;
cout<<"Manager's screen"<<endl<<endl;
cout<<"Enter how many items to be there in the menu"<<endl;
cin>>no;
cout<<"Enter today's menu"<<endl;
for(i=0; i<no; i++)
{
[B][U] for(j=0; j<??;j++) // condition to end J is the error[/U][/B]
{
cin>>arr[i][j];
}
cout<<"Enter the price of the item"<<endl;
cin>>price[i];
}
for(k=0; k<no; k++)
{
cout<<endl;
for(m=0; arr[k][m]!='\0'; m++)
{
cout<<arr[k][m];
}
cout<<" "<<price[k];
}
getch();
}