- 博客(21)
- 资源 (5)
- 收藏
- 关注
原创 对《OpenCV3编程入门》这本书的勘误页码进行排序
前言《OpenCV3编程入门》这本书由知名博主浅墨_毛星宇等人编著,非常适合入门OpenCV初学者使用,本人正在入门,但在网上得知书中有不少错误,所以我想将这些错误罗列起来,供大家和自己查找。在翻阅浅墨_毛星宇的博客得知这些错误的地方,作者对错误在博客上进行了及时的勘误,很负责的态度值得赞赏。错误的页码,在作者的四次勘误中,有点乱,所以我将其进行了排序,就是简单的冒泡排序。/*...
2018-03-31 21:14:03 388
原创 vs2012及以上版本中写c++时自动给代码添加创建信息注释的问题
一般的我们在创建新的代码文件的时候,我们希望能在创建的时候自动就生成我们在代码开头想要的东西,包括创建信息注释,如版权声明、文件名、作者、日期时间、版本号等信息,而且包括初始的头文件声明和主函数等一些信息。写多了,就烦了,如果系统能自动生成就好了。确实在写java等语言时,能轻松做到这些,甚至包括生成实时的日期时间,当前的文件名等其他同步信息。然而在vs上,对C#能完成这些设置,但是对...
2018-03-31 19:05:27 6644 5
原创 多种形式的选择排序算法
冒泡排序几乎只有一种形式,然而选者排序不止一种。下面介绍几种不同算法思想的选择排序。#include<iostream>using namespace std;int main(){ #if 1 //version 3.0 //与版本1和2,算法思路完全不同的冒泡的另一种形式(之前还误以为是选择排序) int a[10] = {1,2,3,4,...
2018-03-28 17:15:25 358
原创 4.4 操作符重载
(1) +加号操作符重载://+加号操作符重载#include<iostream>using namespace std;class Complex{public: Complex(int a,int b) { this->a = a;//实数 this->b = b;//虚数 ...
2018-03-21 21:51:45 191
原创 4.3 友元函数与友元类
(1)友元函数#include<iostream>#include<cmath>using namespace std;class Point{public: //声明全局函数PointDistance是Point类的一个友元函数。 friend double PointDistance(Point &p1,Point&...
2018-03-21 20:54:28 215
原创 4.2 全局函数与成员函数
#include<iostream>using namespace std;class Test{public: Test(int a,int b) { this->a = a; this->b = b; } void printT() { cout << "a ...
2018-03-21 20:40:27 629
原创 4.1 this指针
#include<iostream>using namespace std;class Test{public: Test(int k) { this->m_k = k;//要常使用this 增加可读性 } int getK() const //成员函数尾部出现const,修饰的是this指针 ...
2018-03-21 18:58:23 149
原创 3.9 static练习和强化练习
计算长方体的体积#include<iostream>using namespace std;class Box{public: Box(int l,int w) { len = l; width = w; } int volume() { int v = len*width*hight; co
2018-03-18 22:12:59 312
原创 3.8 static成员变量与函数
#include<iostream>using namespace std;class AA{public: AA(int a,int b) { m_a = a; m_b = b; } //static修饰的静态成员变量 static int m_c;//m_c存在静态区,单独区域,唯该类所...
2018-03-18 22:06:49 124
原创 3.7 new和delete
#include<iostream>using namespace std;class Test{public: Test() { m_a = 0; m_b = 0; } Test(int a,int b) { cout << "Test(int, int)" &l...
2018-03-18 21:54:54 102
原创 3.6 构造函数的初始化列表
#include<iostream>using namespace std;class A{public: A(int a) { cout << "A()...." << a << endl; m_a = a; } ~A() { cout <&l...
2018-03-16 18:56:51 101
原创 3.5 c++中的深拷贝与浅拷贝
#include<iostream>using namespace std;class Teacher {public: Teacher(int id,char *name) { cout << "Teacher(int id,char *)" << endl; //赋值id m_id =...
2018-03-14 22:43:47 241 1
原创 3.4 拷贝构造函数的6种应用场景
#include<iostream>using namespace std;class Test{public: Test() { cout << "Test()" << endl; m_x = 0; m_y = 0; } Test(int x, int y) {...
2018-03-14 22:26:28 943
原创 3.3拷贝构造函数
#include<iostream>using namespace std;class Test{public: Test() { m_x = 0; m_y = 0; } Test(int x,int y) { m_x = x; m_y = y; } ...
2018-03-13 23:09:23 171
原创 3.2默认的无参构造和析构函数
#include<iostream>using namespace std;class Test{public: //默认的无参构造函数#if 0 Test() { }#endif //显式无参构造,会覆盖默认的 Test() { m_x = 0; m_y = 0; } ...
2018-03-13 23:05:27 401
原创 3.1 构造函数与析构函数
#include<iostream>using namespace std;class Test{public: Test()//无参构造函数 { m_x = 0; m_y = 0; } //test类的构造函数 //在对象被创建的时候,用来初始化的函数 Test(int x,int y)...
2018-03-13 22:53:06 139
原创 2.12.求圆面积的多文件形式
点的头文件Point.h#pragma onceclass Point{public: void setXY(int x,int y); int getX(); int getY();private: int m_x; int m_y;};圆的头文件Circle.h#pragma once#include "Point.h"...
2018-03-12 21:01:25 230
原创 使用include头文件时,尖括号与双引号的区别
include <>格式: 一般用于包含标准的库头文件,编译器会去系统配置的库环境变量和者用户配置的路径去搜索,而不会在项目的当前目录去查找incluce “”格式: 一般用于包含用户自己编写的头文件,编译器会先在项目的当前目录查找,找不到后才会去系统配置的库环境变量和用户配置的路径去搜索而且: 无论这个文件是C/C++提供的还是用户自己编写的,都可以使用#include...
2018-03-12 20:30:58 1388
原创 2.11 求点是否在圆内
#include<iostream>using namespace std;//点类class Point{public: //获取点的位置 void setXY(int x,int y) { m_x = x; m_y = y; } int getX() { return m_x...
2018-03-12 17:42:43 444
原创 2.10 求两个长方体是否相等
#include<iostream>using namespace std;//长方体类class Cuboid{public: void setABC(int a, int b,int c) { m_a = a; m_b = b; m_c = c; } int getArea() ...
2018-03-12 16:31:13 401
原创 面向过程与面向对象
#include<iostream>using namespace std;class Dog{public: char name[64]; void eat(char *food) { cout << name << "吃" << food <<endl; }};//面...
2018-03-12 15:28:20 152
跟我一起写 Makefile_(PDF 重制版).rar
2020-07-27
基于SeetaFace+VS2017+Qt的人脸识别
2018-08-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人