测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A27034. 下面c++代码在一个结构体中又定义了别的结构体。这种结构嵌套定义的方式语法不正确。( )#include <string> #include <vector> using namespace std; struct Library { struct Book { struct Author { string name; int birthYear; }; string title; int ye…

判断题 较难

题目描述

下面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;
};

选项(单选)

上一题 下一题