Fork me on GitHub
上一页 1 ··· 88 89 90 91 92 93 94 95 96 ··· 119 下一页
摘要: 什么是引用?引用:给数据起别名 格式:数据类型 数据名 = &数据名; #include <iostream> using namespace std; int main() { int a = 10; int &b = a; cout << "a的值是:" << a<<endl; cout << 阅读全文
posted @ 2019-12-23 17:07 西西嘛呦 阅读(208) 评论(0) 推荐(0)
摘要: c++在程序执行时,将内存大方向分为四个区: 代码区:存放函数体的二进制代码,由操作系统进行管理; 全局区:存放全局变量和静态变量以及常量; 栈区:由编译器自动分配释放,存放函数的参数值、局部变量等; 堆区:由程序员分配和释放,若程序员不释放,程序结束时由操作系统回收; 内存四区的意义:不同区域存放 阅读全文
posted @ 2019-12-23 16:08 西西嘛呦 阅读(177) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; constexpr auto MAX = 1000; //联系人结构体 struct Person { string m_name; int m_sex; int m_age; string m_phone; strin 阅读全文
posted @ 2019-12-23 15:13 西西嘛呦 阅读(566) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; constexpr auto MAX = 1000; //联系人结构体 struct Person { string m_name; int m_sex; int m_age; string m_phone; strin 阅读全文
posted @ 2019-12-23 15:07 西西嘛呦 阅读(621) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; constexpr auto MAX = 1000; //联系人结构体 struct Person { string m_name; int m_sex; int m_age; string m_phone; strin 阅读全文
posted @ 2019-12-23 14:59 西西嘛呦 阅读(1091) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; constexpr auto MAX = 1000; //联系人结构体 struct Person { string m_name; int m_sex; int m_age; string m_phone; strin 阅读全文
posted @ 2019-12-23 14:42 西西嘛呦 阅读(1316) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; constexpr auto MAX = 1000; //联系人结构体 struct Person { string m_name; int m_sex; int m_age; string m_phone; strin 阅读全文
posted @ 2019-12-23 14:24 西西嘛呦 阅读(557) 评论(0) 推荐(0)
摘要: 添加联系人 1.设计联系人结构体 2.设计通讯录结构体 3.main函数中创建通讯录 4.分装添加联系人函数 5.测试添加联系人功能 #include<iostream> using namespace std; constexpr auto MAX = 1000; //联系人结构体 struct 阅读全文
posted @ 2019-12-23 14:12 西西嘛呦 阅读(955) 评论(0) 推荐(0)
摘要: 菜单界面 #include<iostream> using namespace std; //菜单界面 void showMenu() { cout << "************************" << endl; cout << "***** 1.添加联系人 *****" << end 阅读全文
posted @ 2019-12-23 13:47 西西嘛呦 阅读(652) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; struct Student { string name; int age; string sex; }; void printStuArr(Student stuArr[]) { for (int i = 0; i 阅读全文
posted @ 2019-12-23 13:29 西西嘛呦 阅读(1161) 评论(0) 推荐(0)
上一页 1 ··· 88 89 90 91 92 93 94 95 96 ··· 119 下一页