转自:http://www.cnblogs.com/wanqieddy/archive/2011/09/21/2184257.html在Makefile中我们经常看到 = := ?= +=这几个赋值运算符,那么他们有什么区别呢?我们来做个简单的实验新建一个Makefile,内容为:ifdef DEF...
分类:
其他好文 时间:
2015-08-10 07:03:43
阅读次数:
113
ref:http://www.cplusplus.com/doc/tutorial/preprocessor/concolusion:directives:#define #undef#include#if #else #elif #endif #ifdef #ifndef#error ( #war...
分类:
编程语言 时间:
2015-08-09 23:50:31
阅读次数:
159
Pch文件内添加:#ifdef DEBUG // 调试阶段#define CHLog(...) NSLog(@"%s %d\n %@", __func__, __LINE__, [NSString stringWithFormat:__VA_ARGS__])#else // 发布阶段#define ...
分类:
移动开发 时间:
2015-08-08 22:34:48
阅读次数:
161
#ifdef GLOBE_20150806
#define GLOBE_EXPIMP __declspec(dllexport)
#else
#define GLOBE_EXPIMP __declspec(dllimport)
#endif
GLOBE_EXPIMP extern std::string WideCharToMultiChar(std::wstring str);//宽字...
分类:
其他好文 时间:
2015-08-07 11:07:29
阅读次数:
169
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
这是文件读取重定向语句。
一般都加上
#ifdef
LOCAL
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
可以把LOCAL加到编译选项里面这样...
分类:
其他好文 时间:
2015-08-05 18:25:09
阅读次数:
109
不解释。
#ifdef DEBUG // 调试状态, 打开LOG功能
#define MYLog(...) NSLog(__VA_ARGS__)
#else // 发布状态, 关闭LOG功能
#define MYLog(...)
#endif...
分类:
移动开发 时间:
2015-08-03 21:04:07
阅读次数:
177
pch文件加入#import #ifndef __IPHONE_3_0#warning "This project uses features only available in iOS SDK 3.0 and later."#endif#ifdef __OBJC__#import #import
分类:
其他好文 时间:
2015-08-03 18:12:54
阅读次数:
151
#ifdef DEBUG# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);#else# define DLog(...)#en...
分类:
其他好文 时间:
2015-08-03 16:50:51
阅读次数:
109
转自大牛的解析(非常具体详细)http://www.cnblogs.com/skynet/archive/2010/07/10/1774964.html我做个简单的标注方便以后自己查看:在用C++的项目源码中,经常会不可避免的会看到下面的代码:#ifdef __cplusplus //采用c++,....
分类:
其他好文 时间:
2015-08-02 14:57:12
阅读次数:
107
1. C++调用C语言函数
C语言头文件 c_header.h
#ifndef __C_HEADER_H_
#define __C_HEADER_H_
#ifdef __cplusplus
extern "C"
{
#endif
int c_add(int a, int b);
void c_print_data(int x);
#ifdef __cplusplus
}
#end...
分类:
编程语言 时间:
2015-07-29 19:26:43
阅读次数:
135