会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
nanqiang
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
29
下一页
2020年6月8日
c++11 thread
摘要: 官方例子 // thread example #include <iostream> // std::cout #include <thread> // std::thread #include <unistd.h> using namespace std; void foo() { // do s
阅读全文
posted @ 2020-06-08 15:20 cicero
阅读(200)
评论(0)
推荐(0)
2020年5月20日
QMessageBox 使用
摘要: QMessageBox::StandardButton rb = QMessageBox::information(NULL, tr("Warnning!"), tr("The Application is running?"), QMessageBox::Yes|QMessageBox::No|Q
阅读全文
posted @ 2020-05-20 16:01 cicero
阅读(215)
评论(0)
推荐(0)
2020年5月14日
Ubuntu虚拟机配置nfs
摘要: 1、在虚拟机中安装服务:sudo apt-get install nfs-kernel-server 2、建立共享目录:sudo mkdir /nfsroot3、赋予权限:sudo chmod 777 /nfsroot 4、修改配置文件:sudo vim /etc/exports。在文件的最后加入以
阅读全文
posted @ 2020-05-14 10:41 cicero
阅读(639)
评论(0)
推荐(0)
2020年5月12日
test
摘要: 记录一个笔试题,下面哪里会报错 #include <stdio.h> struct S { int i; int *p; }; int main() { S s; int *p = &s.i; p[0] = 3;//i=3,s.p=0; p[1] = 4;//i=3,s.p=4 s.p = p;//
阅读全文
posted @ 2020-05-12 17:35 cicero
阅读(101)
评论(0)
推荐(0)
2020年4月22日
Qt 布局时组件不贴边
摘要: qt 使用布局时,里面的组建不贴边时,调用 setContentsMargins(0,0,0,0); 例如: vlay1 = new QVBoxLayout(); vlay1->setContentsMargins(0,0,0,0);
阅读全文
posted @ 2020-04-22 14:24 cicero
阅读(427)
评论(0)
推荐(0)
2020年4月15日
QPainter 居中写字
摘要: int strwidth = painter.fontMetrics().width(strTxt);//字符串显示的像素大小 painter.drawText(this->width()/2-strwidth/2,this->height(),m_strTxt); 或者painter.drawTe
阅读全文
posted @ 2020-04-15 15:35 cicero
阅读(990)
评论(0)
推荐(0)
2020年4月2日
stringstream
摘要: C++标准库中的<sstream>提供了比ANSI C的<stdio.h>更高级的一些功能,即单纯性、类型安全和可扩展性 定义一个通用的转换模板,用于任意类型之间的转换。函数模板convert()含有两个模板参数out_type和in_value,功能是将in_value值转换成out_type类型
阅读全文
posted @ 2020-04-02 09:37 cicero
阅读(211)
评论(0)
推荐(0)
2020年3月13日
cmake 使用
摘要: 在 linux 平台下使用 CMake 生成 Makefile 并编译的流程如下: 编写 CMake 配置文件 CMakeLists.txt 。 执行命令 cmake PATH 生成 Makefile 。 PATH 是 CMakeLists.txt 所在的目录。 使用 make 命令进行编译。 例子
阅读全文
posted @ 2020-03-13 10:56 cicero
阅读(164)
评论(0)
推荐(0)
2020年3月12日
c++ 生成随机密码
摘要: #include <stdlib.h> #include <iostream> #include <time.h> #include <string> #include <stdio.h> using namespace std; int main(int argc, char* argv[]) {
阅读全文
posted @ 2020-03-12 10:54 cicero
阅读(992)
评论(0)
推荐(0)
2020年1月1日
windows 官方镜像下载地址
摘要: https://www.microsoft.com/zh-cn/software-download/windows7
阅读全文
posted @ 2020-01-01 18:53 cicero
阅读(861)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
29
下一页
公告