易截截图软件、单文件、免安装、纯绿色、仅160KB

c宏定义的技巧总结


http://blog.csdn.net/eroswang/archive/2009/06/12/4265046.aspx
1,防止一个头文件被重复包含
#ifndef COMDEF_H
#define COMDEF_H
//头文件内容
#endif
2,重新定义一些类型,防止由于各种平台和编译器的不同,而产生的类型字节数差异,方便移植。
typedef unsigned char      boolean;     /* Boolean value type. */
typedef unsigned long int uint32;      /* Unsigned 32 bit value */
typedef unsigned short     uint16;      /* Unsigned 16 bit value */
typedef unsigned char      uint8;       /* Unsigned 8 bit value */
typedef signed long int    int32;       /* Signed 32 bit value */
typedef signed short       int16;       /* Signed 16 bit value */
typedef signed char        int8;        /* Signed 8 bit value */
//下面的不建议使用
typedef unsigned char     byte;         /* Unsigned 8 bit value type. */
typedef unsigned short    word;         /* Unsinged 16 bit value type. */
typedef unsigned long     dword;        /* Unsigned 32 bit value type. */
typedef unsigned char     uint1;        /* Unsigned 8 bit value type. */
typedef unsigned short    uint2;        /* Unsigned 16 bit value type. */
typedef unsigned long     uint4;        /* Unsigned 32 bit value type. */
typedef signed char       int1;         /* Signed 8 bit val


相关文档:

C/C++面试题

1.介绍一下STL,详细说明STL如何实现vector.
    Answer:
    STL (标准模版库,Standard Template Library.它由容器算法迭代器组成。
    STL有以下的一些优点:可以方便容易地实现搜索数据或对数据排序等一系列的算法;调试程序时更加安全 和方便;即使是人们用STL在 ......

Pipe is a worm hole connecting C and C++

In C programming language, the observer design pattern is implemented with function pointer (aka callback function). But in Qt library, it introduces signal and slot. How to link a callback function from the C callback function to the C++ siganl and slot is a problem I encounter. Call back function ......

怎么样在C/C++中调用Java

Java跨平台的特性使Java越来越受开发人员的欢迎,但也往往会听到不少的抱怨:用Java开发的图形用户窗口界面每次在启动的时候都会跳出一个控制台窗口,这个控制台窗口让本来非常棒的界面失色不少。怎么能够让通过Java开发的GUI程序不弹出Java的控制台窗口呢?其实现在很多流行的开发环境例如JBuilder、Eclipse都是使用纯Java ......

Excel writing and reading with pure c API

Reading and Writing Excel file with pure C api in windows system. tested on windows 2000, hope it can help you:
#ifndef _WINXLS_H_
#define _WINXLS_H_
/*============================================================================*
*      Include Files
*================== ......

堆栈的C代码实现

2009-09-13     16:42:43  
 今天实现堆栈结构部分的代码,并用一简单程序测试成功。
stack.h:
#ifndef _STACK_H_
#define _STACK_H_
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#define STACK_INIT_SIZE 5
#define STACKINCREMENT 5
t ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号