以下C++代码在结构体中嵌套定义了其他结构体,题目认为该结构嵌套定义的方式语法不正确,请结合代码判断:
#include <string>
#include <vector>
using namespace std;
struct Library {
struct Book {
struct Author {
string name;
int birthYear;
};
string title;
int year;
Author author;
};
string name;
vector<Book> books;
};