C/C++
lixiao_zZ
学无止境
展开
-
指针笔记
1、“指针”是指地址, 是常量,“指针变量”是指取值为地址的变量。 2、int *p1;表示p1是一个指针变量,它的值是某个整型变量的地址。3、指针变量的赋值(1)指针变量初始化的方法 int a;int *p=&a;(2)赋值语句的方法 int a;int *p;p=&a;int *p;p=&a;(3)不允许把数值赋给指针变量p=1000;//这是原创 2017-09-13 18:43:04 · 216 阅读 · 0 评论 -
视觉slam十四讲ch5 joinMap.cpp 代码注释(笔记版)
转自:https://www.cnblogs.com/newneul/p/8407369.html#include #include using namespace std;#include #include #include #include // for formating strings#include #include #include int main(转载 2018-04-13 16:22:58 · 1051 阅读 · 1 评论 -
Eigen的几何模块
转自:https://blog.csdn.net/jjjwwwjjjwww/article/details/68936090#include #include using namespace std;#include #include int main( ){ Eigen::Matrix3d rotation_matrix = Eigen::Matrix3d::Identi转载 2018-04-13 16:20:48 · 3135 阅读 · 1 评论 -
C++ 资料大全中文版
转自:https://github.com/jobbole/awesome-cpp-cn/blob/master/README.mdC++ 资源大全中文版我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列的资源整理。awesome-cpp 就是 fffaraz 发起维护的 C++ 资源列表,内容包括:标准库、Web应用框架、人工智能、数据库、图片处理、转载 2018-04-06 20:32:01 · 1167 阅读 · 0 评论 -
Ubuntu 14.04 安装 ROS indigo 出错:ros-indigo-desktop-full:i386
出错内容:Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been c原创 2018-04-15 22:47:26 · 2417 阅读 · 0 评论 -
sizeof和strlen, length的区别
转自:http://www.cnblogs.com/xggz/p/4774670.html一、sizeof sizeof(...)是运算符,而不是一个函数。 一个简单的例子: int a; cout 在头文件中typedef为unsigned int,其值在编译时即计算好了,参数可以是数组、指针、类型、对象、函数等。转载 2017-09-20 19:50:52 · 631 阅读 · 0 评论 -
头文件中的ifndef/define/endif 的作用
防止该头文件被重复引用保证即使该头文件被多次包含,也只定义一次#ifndef CCONFIGJOGDIALOG_H#define CCONFIGJOGDIALOG_H#include class CConfigJogDialog : public QDialog{ Q_OBJECTpublic: explicit CConfigJogDialo原创 2017-09-12 16:13:56 · 543 阅读 · 0 评论 -
快速排序
转载:http://developer.51cto.com/art/201403/430986.htm高快省的排序算法有没有既不浪费空间又可以快一点的排序算法呢?那就是“快速排序”啦!光听这个名字是不是就觉得很高端呢。假设我们现在对“6 1 2 7 9 3 4 5 10 8”这个10个数进行排序。首先在这个序列中随便找一个数作为基准数(不要被这个名词吓到了,就转载 2017-09-14 11:07:49 · 219 阅读 · 0 评论 -
带模板类的C++链表
#ifndef LIST_H_INCLUDED#define LIST_H_INCLUDEDtypedef struct node{ int data; struct node *next;}NODE;class nodelist{private: NODE *head;public: nodelist(){ head = NULL; }; ...原创 2018-05-24 15:49:26 · 363 阅读 · 0 评论