
c
hyforthy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
可变参数温故
#include va_list ap; void va_start(va_list ap, last); type va_arg(va_list ap, type); void va_end(va_list ap); void va_copy(va_list dest, va_list src);原创 2014-03-17 00:06:03 · 662 阅读 · 0 评论 -
__stdcall 与 __cdecl 区别 (汇编 call ret 时,栈的变化)
__cdeclC++void fun(int a) //默认__cdecl{ cout }int main(){ fun(3); system("pause"); return 0;} 反汇编:void fun(int a){00D713A0 push ebp 00D713A1 mo转载 2014-03-17 00:35:36 · 2530 阅读 · 0 评论 -
宏定义的字符串连接##和字符串化#
宏定义无## 和 #, 参数继续展开;否则就不继续展开例:1、#define A(line) shit_##line #define B(line) A(line) #define C int B(__LINE__) C; --> int shit_行号;///////////////////////////////////////原创 2014-03-18 18:54:00 · 8805 阅读 · 1 评论 -
二分查找最后一个小于等于和第一个大于等于某对象的数组元素位置
funny:int findLastLE(int *array, int n, int target) // satisfy condition: array[?] <= target and the last one{ int start = 0, end = n - 1; while (start <= end) { int mid = (start + end) / 2原创 2014-03-30 22:17:08 · 8474 阅读 · 1 评论 -
C和C++接口相互调用 extern "C"
extern "C" 只能用在C++文件内, 用于表明 其修饰的函数原创 2014-04-24 22:30:10 · 1201 阅读 · 0 评论