carray is a pointer to the first car structure in an array of car structures, and num is an integer. I used cin.getline() in a for loop after I declared car. When I try to compile this, I get an error
saying, "error: no matching function for call to 'std::basic_istream<char>::getline(char[30])".
1 2 3 4 5 6
struct car
{
char make[30];
int year;
};
cin.getline(carray[num].make);