随笔分类 -  c++

c++ 结构体的构造函数
摘要:结构体中构造函数 1、不使用构造函数 1 #include<iostream> 2 3 struct student { 4 5 int age; 6 std::string gender; 7 8 }Liu; 9 10 int main() { 11 Liu.age = 20; 12 Liu.ge 阅读全文
posted @ 2024-05-21 14:53 DLst_liu 阅读(364) 评论(0) 推荐(0)