I've been playing around with this for a while and just can't seem to get it right. Any help is appreciated!
string catalog[][] = { {"item1 - 0 dollar(s) each","description1"},
{"item2 - 3 dollar(s) each","description2"},
{"item3 - 5 dollar(s) each","description3"},
{"item4 - 7 dollar(s) each","description4"},
{"item5 - 9 dollar(s) each","description5"}
};
void DisplayCatalog(){
for(int x = 0;x <= 4;x++){
cout << catalog[x,0] << endl;
}
}
I'm trying to get the for loop to display item1,2,3,4 and 5 but there's an error with the array: an array may not have elements of this type