上一页 1 ··· 156 157 158 159 160 161 162 163 164 ··· 178 下一页
  2019年3月24日
摘要: 格式: #ifndef _test.h_ //这里放不想被重复包含的代码 #define _test.h_ #endif define用于条件编译的意思是不想让头文件重复编译,头文件重复编译会造成的结果: 1.文件变大. 2.引起重复编译错误. 阅读全文
posted @ 2019-03-24 18:16 一杯明月 阅读(383) 评论(0) 推荐(0)
  2019年3月21日
摘要: g++ main.cpp -std=c++11 -o a 其中: main.cpp是要编译的源文件 a是编译后的文件名 注意-std=c++11不要写成-std=c11 阅读全文
posted @ 2019-03-21 14:33 一杯明月 阅读(656) 评论(0) 推荐(0)
摘要: myClass()=default;//表示默认存在构造函数 阅读全文
posted @ 2019-03-21 14:03 一杯明月 阅读(2642) 评论(0) 推荐(0)
  2019年3月19日
摘要: 头文件: #pragma once #include<iostream> #include<vector> using namespace std; class Student { public: Student(double hei):height(hei){} double getheight( 阅读全文
posted @ 2019-03-19 10:01 一杯明月 阅读(160) 评论(0) 推荐(0)
  2019年3月18日
摘要: 头文件wuyong.h: #pragma once #include<iostream> using namespace std; template<typename T> struct ismulti { T a; ismulti(const T& b):a(b){} bool operator( 阅读全文
posted @ 2019-03-18 19:48 一杯明月 阅读(176) 评论(0) 推荐(0)
  2019年3月17日
摘要: 头文件wuyong.h: #pragma once #include<iostream> #include<vector> #include<deque> #include<algorithm> #include<string> using namespace std; class Player { 阅读全文
posted @ 2019-03-17 21:42 一杯明月 阅读(397) 评论(0) 推荐(0)
摘要: 直接上代码,一调试,一切就明白: 直接在源文件中实现,源文件的名字随便取: #include<iostream> using namespace std; int mycount(int* start ,int* end, int val)//算法,负责统计某个容器中某个元素出现的个数 { int 阅读全文
posted @ 2019-03-17 09:45 一杯明月 阅读(267) 评论(0) 推荐(0)
  2019年3月16日
摘要: 听侯捷老师的讲课笔记: 所谓转换函数指的是类型之间的转换,比如把自定义的类类型转换成内建类型(比如double),后者向相反的方向转。 直接上代码: 头文件conversion_function.h: #pragma once #include<iostream> using namespace s 阅读全文
posted @ 2019-03-16 15:39 一杯明月 阅读(2019) 评论(0) 推荐(0)
  2019年3月13日
摘要: 1.打开终端,启动roboware软件: $roboware-studio 2.在欢迎使用的页面点新建工作区,工作区的名字建议写为:catkin_ws,路径放在home文件夹或者任意你想放的文件夹中.新建工作区也可以这样: 点击:文件-->新建工作空间(注意:软件界面此时要最大化,才能看见顶部的菜单 阅读全文
posted @ 2019-03-13 22:54 一杯明月 阅读(1838) 评论(0) 推荐(0)
  2019年3月12日
摘要: 1.$mkdir catkin_ws && cd catkin_ws && mkdir src 2.$catkin_make (#这一句是完成编译初始化,注意括号内的内容不可复制,初始化工作空间之后,catkin_ws文件夹中会多出build和devel这两个文件夹,注意:catkin_make编译 阅读全文
posted @ 2019-03-12 21:58 一杯明月 阅读(2009) 评论(0) 推荐(0)
上一页 1 ··· 156 157 158 159 160 161 162 163 164 ··· 178 下一页