Difficult-Rocket/try/c/data_utils.h

34 lines
729 B
C
Raw Normal View History

2022-05-03 13:59:15 +08:00
/* 一个好用的头文件
-------------------------------
Difficult Rocket
Copyright © 2021-2022 by shenjackyuanjie
All rights reserved
-------------------------------
*/
2022-04-30 11:33:04 +08:00
// 基本的头文件引用
#include<stdio.h>
#include<stdlib.h>
// 一些用于直观感受类型字节长度的数据类型
// 看着舒服而已(
2022-04-30 12:57:32 +08:00
// int 整数
2022-04-30 11:33:04 +08:00
#define int8 char
#define int16 short
#define int32 int
#define int64 long long
2022-04-30 12:57:32 +08:00
// uint 无符号整数
2022-04-30 11:33:04 +08:00
#define uint8 unsigned char
#define uint16 unsigned short
#define uint32 unsigned int
#define uint64 unsigned long long
2022-04-30 12:57:32 +08:00
// float 浮点数
2022-04-30 11:33:04 +08:00
#define float32 float
2022-04-30 12:57:32 +08:00
#define float64 double
// bool 布尔值
2022-05-03 13:59:15 +08:00
#define bool int
2022-04-30 12:57:32 +08:00
#define true 1
#define false 0
// 字符串
#define string char*