黑马程序员匠心之作|C++教程从0到1入门编程--练习-结构体数组

作用:将自定义的结构体放入到数组中方便维护 语法:struct 结构体名 数组名[元素个数] = { {} , {} , … {} } #include #include using namespace std; struct Student { string name; int age; int score; }; int main() { struct Student arr[3]= { {“
相关文章
相关标签/搜索