2024年2月27日
摘要: 使用std::function 回调函数 #include <iostream> #include <functional> using namespace std; void readFromFile(const std::string& filename, std::function<void( 阅读全文
posted @ 2024-02-27 08:43 Freedom_lyx 阅读(1) 评论(0) 推荐(0) 编辑
  2023年12月15日
摘要: 一、序列式容器 序列式容器(如 vector, deque)的迭代器删除正确的做法如下: 1 // 在这里想把等于2的元素都删除 2 for(auto it=q.begin();it!=q.end();) 3 { 4 if(*it==2) 5 { 6 it=q.erase(it); // 这里会返回 阅读全文
posted @ 2023-12-15 21:32 Freedom_lyx 阅读(9) 评论(0) 推荐(0) 编辑
  2020年2月18日
摘要: VS release 调试 阅读全文
posted @ 2020-02-18 09:34 Freedom_lyx 阅读(381) 评论(0) 推荐(1) 编辑
  2019年12月25日
摘要: C++ IP ping 阅读全文
posted @ 2019-12-25 10:57 Freedom_lyx 阅读(1809) 评论(0) 推荐(0) 编辑
摘要: Qt utf-8 阅读全文
posted @ 2019-12-25 09:34 Freedom_lyx 阅读(674) 评论(0) 推荐(0) 编辑
  2019年12月19日
摘要: 点击Qt某些控件,查找本地浏览器打开前端传递的URL。 方法一:直接写死本地浏览器地址 方法二:本地库 方法三:注册表 阅读全文
posted @ 2019-12-19 13:49 Freedom_lyx 阅读(3600) 评论(1) 推荐(0) 编辑
  2018年8月23日
摘要: 基本操作: Open() – create a DB Close() - close the DB Query() - 查询 QueryRow() -查询行 Exec() -执行操作,update,insert,delete 。。。。。。 连接mysql数据库,并向其中插入数据: //打开数据库,D 阅读全文
posted @ 2018-08-23 15:32 Freedom_lyx 阅读(174) 评论(0) 推荐(0) 编辑
  2018年8月10日
摘要: 以下内容是自己整理的根据结构体里面的不同变量,对list排序的实例,若有问题可以留言。仅供参考。 1 #include <iostream> 2 #include <list> 3 #include <algorithm> 4 5 using namespace std; 6 7 //声明结构体 8 阅读全文
posted @ 2018-08-10 23:04 Freedom_lyx 阅读(5678) 评论(0) 推荐(0) 编辑
  2017年9月14日
摘要: error MSB8020: The build tools for Visual Studio 2013 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install 阅读全文
posted @ 2017-09-14 20:23 Freedom_lyx 阅读(653) 评论(0) 推荐(0) 编辑
  2015年12月22日
摘要: 遇到这个问题,请打开项目的Properties(属性)------->Configuration Properties(配置属性)------>C/C++ ------>Preprocessor(预处理器)------->Preprocessor Difinitions (预处理器定义) 添加 _... 阅读全文
posted @ 2015-12-22 22:22 Freedom_lyx 阅读(1296) 评论(0) 推荐(0) 编辑