流浪のwolf

卷帝

导航

2024年2月21日

C++ 第二节课 结构体, 字符串 和 C语言的区分

摘要: 1 #include <iostream> 2 3 using namespace std; 4 5 6 // 结构体 7 struct Stu{ 8 string name; 9 int age; 10 11 // 结构体重的函数叫做成员函数 在 C 中是不能直接写函数的 只能使用函数指针,通过指 阅读全文

posted @ 2024-02-21 21:39 流浪のwolf 阅读(2) 评论(0) 推荐(0) 编辑

C++ 第一节课 名字空间 ,输入输出函数,和 C 语言的区别

摘要: #include <iostream> // #include 头文件,C++标准库的头文件都不带 .h (.h 是C库头文件添加的) #include <cstdio> #include <cstring> using namespace std; // namespace 命名空间 为了防止变量 阅读全文

posted @ 2024-02-21 20:40 流浪のwolf 阅读(6) 评论(0) 推荐(0) 编辑