C++ Primer 第五版 学习笔记 Part III

Copy Control A class controls what happens when objects of class type are copied, moved, assigned, and destroyed by defining five special member functions: copy constructor, move constructor, copy-assignment operator, move-assignment operator, destructor. The copy and move constructors define what happens when an object is initialized from another object of the same type. The copy and move assignment operators define what happens when we assign an object of a class

C++ Primer 第五版 学习笔记 Part I and II

基础部分 A stream is a sequence of characters read from or written to an IO device. To handle input, we use an object of type istream named cin; for output, ostream named cout. Also, cerr, clog. All the names defined by standard library are in the std namespace. The value returned from main is a status indicator. A nonzero has a meaning defined by system. The «

Git学习笔记

记录一些常用的 Git 命令,太容易忘了。。。 配置email地址和名字 1 2 git config --global user.name "Your Name" git config --global user.email "email@example.com" 把当前目录变为git仓库,建好后会多出一个.git目

Android单例计费类

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

C++单例模板

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #pragma once namespace MyGame { template<typename T> class Global { public: static void Create() { ASSERT(!s_instance); s_instance = new T; } static void Set(T* obj) { ASSERT(!s_instance);

C++错误笔记

fatal error LNK1120: 无法解析的外部命令 需要在多个源文件中共享变量时,可以声明一个静态变量;如果静态变量声明在cpp文件中,会自动初始化,但不利于外部访问;

Unity3D中的Shader

内建Shader 简单的说,Shader是为渲染管线中的特定处理阶段提供算法的一段代码。Shader是伴随着可编程渲染管线出现的,从而可以对渲

Unity3D 数学相关

点积 点积,又称为点乘,a.b,是向量对应分量乘积的和,结果为一个标量。 代数定义:[x,y,z].[a,b,c] = ax+by+cz。 几何定义: