是否有LARGEST_INTEGER宏或类似的东西?(C)

sna*_*ile 18 c integer

可能重复:
如何将变量设置为C中可能的最大数量?
int的最大值

我需要在我的代码中使用最大整数值,但我不想显式写4294967295.它是在某处定义的吗?

Jam*_*lis 35

INT_MAX(for int)或UINT_MAX(for unsigned int)中定义的<limits.h>


GMa*_*ckG 6

用途limits.h

#include <limits.h>

int maximum = INT_MAX;
Run Code Online (Sandbox Code Playgroud)