自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 问答 (17)
  • 收藏
  • 关注

原创 【C++】类的引用

#include<iostream>using namespace std; class Time { public: Time(int,int,int);//构造函数,类成员不能直接赋值,必须依靠构造函数 int hour; int minute; int sec; ~Time() { cout<<"fuck off"<&lt...

2019-09-18 10:16:50 1809

原创 【c++】对象指针

#include<iostream>using namespace std;class Time{public: int hour; int minute; int sec; Time(int,int,int); void get_time();};Time::Time(int h,int m,int s){ hour=h; minute=m; sec...

2019-08-29 10:43:29 253

原创 【c++】对象数组

#include<iostream>using namespace std;class Box{private: int width; int height; int length;public: Box(int w,int h,int l):width(w),height(h),length(l){};//为何要引入参数,因为私有成员不能被外部调用 int v...

2019-08-29 09:56:01 155

原创 【c++】析构函数

#include<iostream>#include<string>using namespace std;class Student{private: int num; string name; char sex;public: Student(int n,string nam,char s) //带参数的构造函数实现类成员的初始化 { nu...

2019-08-28 17:02:20 80

原创 【c++】构造函数初始化类成员

#include<iostream>using namespace std;class box{private: int hight; int width; int length;public: int volume();//有返回值的成员函数 box(int,int,int);//有参数的构造函数,可以初始化类成员,多次初始化};box::box(i...

2019-08-28 09:54:26 430

原创 【c++】输入年月日,输出第几天

#include<iostream>using namespace std;struct date{ int year; int month; int day;}date;int main(){ cout<<"please int data:"<<endl; cin>>date.year>>date.month&...

2019-07-20 11:59:42 2903

原创 【c++】枚举类型

#include<iostream>#include<iomanip>using namespace std;int main(){ enum color{red,yellow,blue,white,black}; color pri; int i,j,k,n=0,loop; for(i=red;i<=black;i++) for(j=red;j&...

2019-07-20 10:32:05 82

原创 【c++】结构体

把不同类型数据放在一起作为一个整体。在一个组合项中包含若干个类型不同的数据项。1.定义一个结构体并输出#include<iostream>using namespace std;struct Date{ int month; int day; int year;};struct Student{ int num; char name[20]; char ...

2019-05-27 17:04:11 184

原创 【c++】指针与引用练习

1.三个数排序//指针作为函数参数#include<iostream>#include<iomanip>using namespace std;int main(){ cout<<"inter numbers:"<<endl; int a,b,c; cin>>a>>b>>c; void sort...

2019-05-21 16:47:00 1183

原创 【c++】引用作为函数参数

给三个数排序#include<iostream>#include<iomanip>using namespace std;int main(){ cout<<"inter numbers:"<<endl; int a,b,c; cin>>a>>b>>c; void sort(int&,in...

2019-05-21 09:44:39 155

原创 【c++】const指针

1.指向常量的指针//指向的值不能改变,指向可以改变。#include<iostream>using namespace std;int main(){ int a=10,b=18; const int *p=&a; p=&b; cout<<*p<<endl;}2.常指针//常指针#include<iostrea...

2019-05-20 16:26:32 107

原创 【c++】指向指针的指针

#include<iostream>using namespace std;int main(){ char**p; char*name[]={"im","your","friend"}; p=name+2; cout<<*p<<endl; cout<<**p<<endl;}运行结果:

2019-05-20 15:36:59 179

原创 指针指向函数作为参数

`#include#include#includeusing namespace std;double func1(double x){double r=1+x;return r;}double func2(double x){double r=x*2+3;return r;}double func3(double x){double r=1+exp(x);...

2019-05-20 11:26:52 233

原创 opencv把一张图片覆盖到另一张图片上

#include <iostream>//#include <fstream>#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <openc...

2019-04-04 10:11:42 6750

原创 opencv初始化Mat矩阵尺寸辨析

直接键入行列数和用Size定义:#include <opencv2/opencv.hpp>#include <opencv2/highgui/highgui.hpp>#include <iostream> using namespace cv;using namespace std; #define NBINS 9#define THETA 1...

2019-03-21 11:48:31 1123

原创 sobel算子提取边缘

#include<iostream>#include<opencv2/imgproc/imgproc.hpp>#include<opencv2/highgui/highgui.hpp>using namespace cv;using namespace std;int main(){ Mat M=imread("d:/1.png"); cvtCo...

2019-03-19 16:16:29 1337

原创 【opencv学习笔记】Mat的几种创建方法

1.Mat构造函数#include&amp;amp;lt;opencv2/core/core.hpp&amp;amp;gt;#include&amp;amp;lt;iostream&amp;amp;gt;using namespace std;using namespace cv;int main(){ //尺寸2*2, 8位, U无符号, 3通道, Scalar向量初始化矩阵 Mat M(2,2,CV_8UC3,Scalar(0,0,255)

2019-03-15 10:46:55 1471

转载 撰写说明

这里是引用这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入...

2019-03-15 09:37:08 150

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除