- 博客(28)
- 收藏
- 关注
原创 declaration in header
header.h#pragma oncenamespace std{ template<typename T> class shared_ptr;}class TestClass {};typedef class std::shared_ptr<TestClass> TestClassPtr;void FuncParameterRef(Test...
2018-11-29 11:03:46
283
原创 KeyBoardEvent
reference: js中获取键盘事件 - https://www.cnblogs.com/jiangxiaobo/p/5953863.html<STYLE TYPE="text/css"> TD {text-align:center} </STYLE> <SCRIPT LANGUAGE="JavaScript"> function init() {...
2018-10-29 15:12:48
861
原创 Compile Errors
错误代码:struct MyInt{ MyInt() :mData(0) {} MyInt(int data) : mData(data) {} operator int() { return mData; } int mData;}; int main(){ bool bFlag = false; int aa = bFlag ? ...
2018-10-27 17:23:12
352
原创 DataContaine Clear
std::vector::clearClear contentRemoves all elements from the vector (which are destroyed), leaving the container with a size of 0.A reallocation is not guaranteed to happen, and the vector capacity...
2018-10-27 15:55:38
148
原创 Transforming Normal Vectors
Introduction to 3D Game Programming with DirectX 12 8.2.2 Transforming Normal Vectorsstatic XMMATRIX InverseTranspose(CXMMATRIX M){ XMMATRIX A = M; A.r[3] = XMVectorSet(0.0f, 0.0f...
2018-09-10 11:02:00
198
原创 Tessellation Shader
Tessellation Control Shader(TCS): Tessellation Evaluation Shader(TES):Tessellation Shader的GLSL入门实现: 曲线 Tessellation Shader的GLSL入门实现: 平面 OpenGL的各个Shader的作用与区别
2017-01-05 17:10:50
618
原创 c++ 成员函数尾递归
#include <iostream>int factorial_tail(int n, int first, int second){ if (n == 1) { return second; } else { return factorial_tail(n - 1, second, first + second);
2016-06-08 15:14:10
761
原创 random
1.模拟一次随机事件:p = 0.7 if ((rand()%101)/100.0 <= 0.7) { //this random event happen }2.返回唯一半径为1的球面上的随机点 x = sin(alpha)cos(beta); y = sin(alpha)sin(beta); z = con(alpha); alpha [0,2PI) beta [0,2PI)
2016-05-07 09:56:06
275
原创 Mongo DB c++ 编译
下载python 2.7.11安装程序(不要使用3.X的版本), 使用32位,因为scons只有32位安装包可用;下载scons 2.3.4,MongoDB的驱动是用scons构建的,安装后会自动安装到python的脚本目录里。Python27\Scripts 添加到PATH中或者下载tar,到解压后的目录下面执行python setup.py installboost库MongoDB C+
2016-01-08 11:38:19
542
原创 Adaptive Communication Environment
http://www.oschina.net/news/50799/ace-6-2-5
2016-01-06 15:00:58
616
原创 MT、MTd、MD、MDd
在开发window程序是经常会遇到编译好好的程序拿到另一台机器上面无法运行的情况,这一般是由于另一台机器上面没有安装响应的运行时库导致的,那么这个与编译选项MT、MTd、MD、MDd有什么关系呢?这是msdn上面的解释:MT:mutithread,多线程库,编译器会从运行时库里面选择多线程静态连接库来解释程序中的代码,即连接LIBCMT.lib库MTd:mutithread+debug,多线程调试版
2016-01-01 17:15:30
1002
原创 #pragma
pragma data_seg#include <stdio.h>#include <iostream>#pragma data_seg("flag_data") int app_count = 0;#pragma data_seg()#pragma comment(linker,"/SECTION:flag_data,RWS") struct ScopeAppCount
2015-12-18 17:45:40
369
原创 vs auto build
@echo off @echo 5秒钟后默认开始后台编译: @ping 127.0.0.1 -n 5 1>nul 2>nul @echo start::this is the comment %this is the comment% rem this is the comment echo this is the commentset VSInstall_route=C:\Progra
2015-12-17 19:15:41
327
原创 欢迎使用优快云-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
2015-12-17 19:11:48
162
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人