R. [GESP]L4-202506-Q3227-J
[GESP]L4-202506-Q3227-J
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
下面 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;
};
{{ select(1) }}
- 正确
- 错误
GESP 2025.06 C++ 四级 全真模拟赛
- 状态
- 已结束
- 规则
- OI
- 题目
- 27
- 开始于
- 2026-11-20 13:32
- 结束于
- 2026-11-25 13:32
- 持续时间
- 2 小时
- 主持人
- 参赛人数
- 0