void display( string restaurant[],int current_size)
{
for (int i=0; i < current_size; i++)
{
if ( i < current_size)
{
cout << ", ";
cout << restaurant[i];
}
}
}
so this code displays :
,Arbys, Texas Roadhouse, McDonalds, Burgerking, Zupas, Panda Express
So my question is, there's that comma in the beginning. I can't get rid of it. The program lets me add new restaurants to the ARRAY and I don't have problem with having extra comma at the end, but I just can't seem to get rid of the comma in the beginning. Any ideas?