- 博客(23)
- 收藏
- 关注
原创 cannot dereference value-initialized map/set iterator C++map中删除元素
C++ map 删除元素 报错 cannot dereference value-initialized map/set iterator
2022-06-28 16:09:45
3226
1
原创 QComboBox获取所在的行数 QTableWidget
QComboBox获取所在的行数在QT中的使用中,QTableWidget单元格中添加控件,QPushButton、QComboBox等,添加直接使用QTableWidget::setCellWidget(int row, int column, QWidget widget)这一函数就可添加成功,但是怎么获取所在行列呢两个方法:1,通过反向获取在表格中的位置QComboBox* PDB = (QComboBox*)sender();int x = PDB->frameGeometry().
2022-05-19 19:02:34
1292
1
原创 C++sqlite3_prepare_v2无法读取Geometry属性
C++sqlite3_prepare_v2无法读取Geometry属性我这几天在用做一个把工程里面sql数据进行更新(update)的操作。在执行strSql="UPDATE Mark_Point SET Geometry =? WHERE SeqNum=?";rc = sqlite3_prepare_v2(database,strSql.c_str(),strlen(strSql.c_str()),&stmt,0);的时候,rc=1,当rc=0的时候才是正确的。尝试了好多遍,当时以为是
2022-03-05 14:41:05
825
原创 凑零钱问题_记忆录优化(C++版本)
凑零钱问题_记忆录优化(C++版本)凑零钱问题:给定k种面值的硬币,分别是c1,c2, … , ck,每种硬币的数量无限,请问最少需要多少枚硬币可以凑出总金额total,如果凑不出将返回-1.C++实现函数如下:int leastCoinNum(vector<int>& coins, int n, map<int, int>&memo){ if (n == 0)return 0; if (n < 0) return -1; int res = I
2021-09-09 13:44:59
130
原创 ## 错误 C4996 ‘getch’: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conf
## 错误 C4996 ‘getch’: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _getch.我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:在vs2019中调用getch函数,编译的时候会报错:ch = getch();错误 C4996 ‘getch’: The P
2021-04-07 14:03:35
692
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人