是小邹啊

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2020年7月3日

摘要: #include <stdio.h> typedef int FuncType(int,int); //函数 typedef FuncType* FuncPointType; //函数指针 typedef FuncPointType ArrType[2]; //函数指针数组 int Add(int 阅读全文
posted @ 2020-07-03 09:29 是小邹啊 阅读(116) 评论(0) 推荐(0) 编辑

摘要: #include <stdio.h> #include <string.h> typedef int FuncType(int,int); int Add(int a,int b) { return a + b; } int Sub(int a,int b) { return a - b; } vo 阅读全文
posted @ 2020-07-03 09:21 是小邹啊 阅读(106) 评论(0) 推荐(0) 编辑

2020年7月2日

摘要: 1.使用C语言完成strcpy函数 #include<stdio.h> #include<assert.h> #include<string.h> char *Strcpy(char *dest,const char *src) { assert((src == NULL)||(dest == NU 阅读全文
posted @ 2020-07-02 14:20 是小邹啊 阅读(566) 评论(0) 推荐(0) 编辑

2020年5月8日

摘要: 使用setting 可以将应用程序关闭前的数据都保存到系统的注册表当中 , 并且下次再打开程序时可以冲注册表中读取上一次关闭时的状态 需要注意的是保存到注册表中的数据 都是以键值对的形式存在 void SettingsGui::writeSettings() { //数据的存储 settings-> 阅读全文
posted @ 2020-05-08 19:26 是小邹啊 阅读(1054) 评论(0) 推荐(0) 编辑

2020年5月6日

摘要: void MyText::slot_open() { //选择文件 QString path = QFileDialog::getOpenFileName(this,"选择文件",":/","头文件(*.h);;源文件(*.cpp);;所有文件(*.*)"); if(!path.isEmpty()) 阅读全文
posted @ 2020-05-06 19:33 是小邹啊 阅读(907) 评论(0) 推荐(0) 编辑

2020年4月28日

摘要: typedef pair<string,Student>pair_t; int main() { map<string,Student> mapstu; mapstu.insert(pair_t("2",Student("delaiwen",23))); mapstu.insert(pair_t(" 阅读全文
posted @ 2020-04-28 11:53 是小邹啊 阅读(188) 评论(0) 推荐(0) 编辑

2020年4月27日

摘要: int main() { set<Student> stuset; stuset.insert(Student("zhangsan",22)); //默认为升序 会自动调用<操作符重载 stuset.insert(Student("lisi",52)); stuset.insert(Student( 阅读全文
posted @ 2020-04-27 17:34 是小邹啊 阅读(160) 评论(0) 推荐(0) 编辑

摘要: int main() { list<Student> stulist; stulist.push_back(Student("zhangsan",22)); stulist.push_back(Student("lisi",23)); stulist.push_back(Student("lisi" 阅读全文
posted @ 2020-04-27 16:03 是小邹啊 阅读(201) 评论(0) 推荐(0) 编辑

摘要: //queue:先进先出,pop头部删除//stack:先进后出,pop尾部删除int main() { queue<Student> stuque; stuque.push(Student("zhangsan",22)); stuque.push(Student("lisi",22)); stuq 阅读全文
posted @ 2020-04-27 14:42 是小邹啊 阅读(127) 评论(0) 推荐(0) 编辑

摘要: 他是一个双向队列,大部分内容和vector基本一致 主要是需要注意它是双向的,可头插,可尾插 int main() { deque<Student> deq_stu; deq_stu.push_back(Student("lisi",22)); deq_stu.push_back(Student(" 阅读全文
posted @ 2020-04-27 14:20 是小邹啊 阅读(167) 评论(0) 推荐(0) 编辑