我在输入“标题”和“作者”的行中遇到错误。我不太确定该怎么做才能解决这个问题。
struct bookStruct
{
char title[40];
char author[40];
int pages;
int year;
};
enum menu { display=1, add, end} ;
void displayOptions();
void displayBooks();
int main(){
vector<bookStruct> book(11);
string option;
book[0].title = "a";
book[0].author = "b";
book[0].pages = 23;
book[0].year = 21;
displayOptions();
cin >> option;
displayBooks(book);
return 0;
}