结构体定义
课程:C++ · 编程练习
C++编程练习 - 结构体定义
练习内容
#include <iostream>\nusing namespace std;\n\nstruct Student {\n string name;\n int age;\n double score;\n};\n\nint main() {\n Student stu = {"张三", 20, 95.5};\n\n cout << "学生信息:" << endl
课程:C++ · 编程练习
C++编程练习 - 结构体定义
#include <iostream>\nusing namespace std;\n\nstruct Student {\n string name;\n int age;\n double score;\n};\n\nint main() {\n Student stu = {"张三", 20, 95.5};\n\n cout << "学生信息:" << endl