码迷,mamicode.com
首页 >  
搜索关键字:pragma macro    ( 2934个结果
常用宏定义
#ifndefFingerTips_Macro_Config_h#defineFingerTips_Macro_Config_h//获取屏幕宽度、高度#defineSCREEN_WIDTH([UIScreenmainScreen].bounds.size.width)#defineSCREEN_HEIGHT([UIScreenmainScreen].bounds.size.height)//DEBUG模式下打印日志,当前行#ifdefDEBUG#defineNSLog(f..
分类:其他好文   时间:2014-10-11 03:22:25    阅读次数:212
游戏框架其九:网和着色器( Mesh and Shader )
网的重要作用可以导入3DMAX等创建的模型,到游戏中;着色器可以实现特定绚丽的效果。它们的实现如下 1. 网 Mesh的实现: #pragma once //======================================================================== // File: Mesh.h - classes to render meshes in ...
分类:其他好文   时间:2014-10-11 00:01:04    阅读次数:709
HDU5044---Tree 树链剖分
大致题意:add1 u v u到v路径上所有点的权值加上k,add2 u 到v路径上所有边的权值加上k最后输出所有点的权值,边的权值。。树链剖分预处理然后来个线性O(n)的操作。刚开始用线段树tle了. 1 #pragma comment(linker, "/STACK:1024000000,1.....
分类:其他好文   时间:2014-10-10 22:00:24    阅读次数:295
初涉后缀数组
以POJ 1743为例。模板中的基数排序基于前向星。 具体证明过程详见 算法合集之《后缀数组——处理字符串的有力工具》,很不错的一篇论文。 #include #include #include #include #include #include #include #include #include #include #include #pragma comment(l...
分类:编程语言   时间:2014-10-10 17:59:34    阅读次数:227
使用zzip和minizip解压缩文件
#include #include #include #include #include #include #ifdef _DEBUG#pragma comment( lib, "zlib_d.lib")#pragma comment( lib, "zzip_d.lib")#pragma comme...
分类:其他好文   时间:2014-10-10 15:05:13    阅读次数:139
Unreal Engine 4 C++ 为编辑器中Actor创建自定义图标
有时候我们创建场景的时候,特定的Actor我们想给它一个特定的图标,便于观察。比如这样: 实现起来也很简单,需要编写C++代码: 我们创建一个Actor,叫AMyActor,它包含一个Sprite(精灵),这个精灵负责显示自定义图标:代码如下 #pragma once #include "GameFramework/Actor.h" #include "Components/Bil...
分类:编程语言   时间:2014-10-10 12:01:34    阅读次数:354
游戏框架其九:灯光和材质( Lights and Material )
灯光和材质的实现如下: 1. 灯光 #pragma once //========================================================================= // Lights.h - implements a simple light class for the scene graph //=======================...
分类:其他好文   时间:2014-10-10 00:27:53    阅读次数:301
为mit scheme添加for循环语句
Mit-Scheme不支持syntax-case, 只能用它的er-macro-transformer来编写。Mit-Scheme的宏系统比较低级,不支持模式匹配和literal。使用pmatch能得到一个可用的模式匹配,为了简洁这里使用了pmatch,没有pmatch也可以编写同样的宏,但啰嗦一点...
分类:其他好文   时间:2014-10-09 23:10:47    阅读次数:223
通过控件获取cell
#pragma mark - 通过控件获取cell-(UITableViewCell*)GetCellFromTableView:(UITableView*)tableView Sender:(id)sender { CGPoint pos = [sender convertPoint:CGPoi....
分类:其他好文   时间:2014-10-09 22:41:57    阅读次数:188
Hdu 3804 树链剖分 第5遍
不能原谅自己的错误。。还怀#pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #include #define lson id << 1 #define rson id << 1|1 #include using namespace std; const int M = 100008; int fath...
分类:其他好文   时间:2014-10-09 20:11:27    阅读次数:127
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!