c++
文章平均质量分 62
yyn1019
这个作者很懒,什么都没留下…
展开
-
ubuntu 安装了qtcreator,编译linuxdeployqt问题
ubuntu安装linuxdeployqt问题原创 2022-11-19 17:29:50 · 398 阅读 · 0 评论 -
linux c/c++封装mysql连接
linux c/c++ 封装mysql操作原创 2022-11-03 17:53:29 · 244 阅读 · 0 评论 -
linux c/c++使用sqlite3读取数据
ubuntu20.4 c/c++使用sqlite3数据库原创 2022-11-03 17:43:35 · 887 阅读 · 0 评论 -
win32下tab控件的使用实现
下面是实现的主要代码: #define C_PAGES 7 //七个tab页面的dialogbox #define DELAYTIME 1000 typedef struct { WORD dlgVer; WORD signature; DWORD helpID; DWORD exStyle; DWORD style; WORD cDlgItems; short x; short y; short cx; short cy; } DLGTEMPLATEEX; typedef struct tag_dlghd原创 2021-03-06 21:09:41 · 1074 阅读 · 0 评论 -
mysql添加新用户,赋予超级权限,及访问本机虚拟机的centos上的数据库
添加新用户love,密码 create user ‘love’@‘localhost’ identified by ‘Czzz1234.’; 赋予love所有权限,下面的 . 两边要加**: grant all privileges on . to ‘love’@‘localhost’ with grant option; 修改为所有主机都通过该用户访问: update user set hos...原创 2020-05-05 07:33:59 · 333 阅读 · 1 评论 -
关于windows下读取mysql数据为乱码
在vs2019下用c++连接mysql,读取数据时为乱码, 解决办法为: 在查询前添加下面语句: mysql_query(connection, “SET NAMES GB2312”); 在linux环境下则是: mysql_query(connection, “SET NAMES UTF8”); ...原创 2020-05-05 07:20:40 · 145 阅读 · 0 评论 -
vscode通过官方文档配置c++环境的一些问题
这是官方文档配置c++环境: https://code.visualstudio.com/docs/cpp/config-mingw 因为我电脑安装了dev,就直接环境变量添加dev包含的MinGW64路径 F:\Dev-\Dev-Cpp\MinGW64\bin 使用官方的示例: 会出错,提示: 但是将代码改为: 就会编译成功 自己的简单测试程序也可以: 也可以成功运行。 这是怎么回事...原创 2020-05-03 12:07:13 · 170 阅读 · 0 评论 -
leetcode,二分法实现int sqrt函数
萌新不知道怎么优化代码!!! class Solution { public: int mySqrt(int x) { if(x = =1)return 1; if(x= =0)return 0; int l=0,r=x,mid=0; while(l<=r) { mid=l+(r-l)/2; if(x/mid==mid)return mid; else if(x/mid<mid) r=...原创 2020-05-02 11:20:38 · 168 阅读 · 0 评论