![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
Yummy_Ou
这个作者很懒,什么都没留下…
展开
-
VS的QT项目报错: MSB4181 “QtRunWork”任务返回了 false,但未记录错误”
打开下方输出界面,会具体显示错误Error,我这是有各文件没有复制过来导致的。将工程文件从一个盘复制到另一个盘时,再次运行就报错。,并且所有QT头文件都找不到。原创 2023-03-27 17:31:21 · 1024 阅读 · 2 评论 -
QCustomPlot 坐标轴单独缩放
QT CustomPlot 坐标轴单独缩放原创 2022-11-29 11:24:45 · 2498 阅读 · 0 评论 -
C++ vector 关于容器扩容思考 对比Python
在读到文章《数据结构与算法之美》关于数组和容器一节时 (笔记在此),提到 容器的优点:将很多数组操作的细节封装起来,如数组插入、删除数据时需要搬移其他数据等支持动态扩容,每次存储空间不够的时候,它都会将空间自动扩容为 1.5 倍大小为什么是1.5倍呢,这个数据是固定的吗?于是在网上查找了资料,也对此进行了测试。1. 网上有1.5倍和2倍两者方法,不同编译器结果不一样gcc,python list是2倍VS是1.5倍两者的区别是,2倍扩容时间复杂度更优,可以保证时间复杂度 O(n)O原创 2020-07-26 00:24:42 · 453 阅读 · 0 评论 -
C++ string字符串末尾添加字符方法
1. 使用+连接str = str+ 'a';// orstr += 'a'; 效率对比:str = str + 'a' 产生的是一个新的对象,再把结果返回str += 'a' 涉及到的是对象的引用,返回引用,避免了产生新的对象2. 使用append函数添加str.append(1, 'a');使用的是append的函数重载,向string的后面加size_type _Count个字符value_type _Chbasic_string& append( size_typ原创 2020-07-21 05:12:39 · 10456 阅读 · 0 评论 -
C++ Function Return an Array 函数返回一组数组
https://blog.csdn.net/lijiayu2015/article/details/528215621. Dynamically allocated memory within a functionfloat* add(float a[3], float b[3]){ float* sum=new float[3];//替换 sum[0] = a[0] + b...转载 2020-01-30 19:29:03 · 643 阅读 · 0 评论 -
设置cout的输出精度
I read the data from the file, the data is like:6336253000000,0,2.89729972727,0.499999869261,0.499999952934,-1.07080008367,0.499999869261,2.36749995293,0.499999916327,0,0.000789873880191,0.0003786445...原创 2019-12-31 00:47:49 · 177 阅读 · 0 评论 -
ROS定义自己的消息类型 自定义消息类型
The massages which I need to record are 5 topics and 2 massege types.I want to set them into one massege type and it is more clear to show this massges.BUILD1. build .msg fileSo build a /msg fold...原创 2019-12-29 22:46:50 · 505 阅读 · 0 评论 -
NOWCODER牛客网C++刷题总结
Because I will participant a interview of C++ software engineer, I use NOWCODER 牛客网 to pratice and review the knowledge of C++, which I have already learned few years ago.But I thought, still some a...原创 2019-12-07 19:47:15 · 283 阅读 · 0 评论