摘要: 做了一些pta题目 阅读全文
posted @ 2023-07-28 21:35 a_true 阅读(9) 评论(0) 推荐(0)
摘要: 继续pta做题 阅读全文
posted @ 2023-07-27 21:04 a_true 阅读(9) 评论(0) 推荐(0)
摘要: 做了一些pta题目,了解了一下最短路径算法 阅读全文
posted @ 2023-07-24 19:35 a_true 阅读(22) 评论(0) 推荐(0)
摘要: 《大道至简》读后感 用了几天的时候读完了《大道至简》,学到了很多东西,也有很深的感悟。 刚拿到这本书的时候很新鲜,把序和前言都一字不落的看了一遍,作者没有写很厚,给我的感觉接受这是一本很精简的干货满满的书。 这本书有八个章节,刚开始用愚公移山愚公也会编程的例子引入,让我感觉这本书很有意思,直到第三章 阅读全文
posted @ 2023-07-23 21:40 a_true 阅读(31) 评论(0) 推荐(0)
摘要: 了解了一下贪心算法,做了一些pta题目 阅读全文
posted @ 2023-07-21 20:34 a_true 阅读(8) 评论(0) 推荐(0)
摘要: 做了100分的pta题目 阅读全文
posted @ 2023-07-19 19:56 a_true 阅读(11) 评论(0) 推荐(0)
摘要: c++ string操作 #include<iostream>#include<stdlib.h>#include<string>using namespace std;void main(){ /*构造函数*/ string str1; //默认构造函数 string str2("abc"); / 阅读全文
posted @ 2023-07-18 14:49 a_true 阅读(14) 评论(0) 推荐(0)
摘要: 做了100分的pta题目 new用法: int *p1 = new int[10]; new创建对象例子:CTest* pTest = new CTest();delete pTest;pTest用来接收对象指针。不用new,直接使用类定义申明:CTest mTest;此种创建方式,使用完后不需要手 阅读全文
posted @ 2023-07-15 20:47 a_true 阅读(18) 评论(0) 推荐(0)
摘要: 做了100多分的pta double类型不能用于求余运算 构造对象数组需要无参构造函数 cin 和getline 一起使用会冲突,原因:cin会把\n留在缓存区,而getline对\n十分敏感 解决方法:加一行cin.ignore(); 忽略第一个字符 set容器,避免重复数据出现,L1-033 出 阅读全文
posted @ 2023-07-14 16:05 a_true 阅读(9) 评论(0) 推荐(0)
摘要: 做了100分的pta题目 erase用法:string arr; arr.erase(arr.begin() + i); 阅读全文
posted @ 2023-07-13 23:09 a_true 阅读(16) 评论(0) 推荐(0)