|
Для инициализации целых констант необходимо использовать макросы из файла stdint.h (этот файл зависит от компилятора, при необходимости его можно написать самому)
1 Each of the following macros expands to an integer constant having the value specified
by its argument and a type with at least the specified width.221)
2 The macro INTN_C(value) shall expand to a signed integer constant with the specified
value and type int_leastN_t. The macro UINTN_C(value) shall expand to an
unsigned integer constant with the specified value and type uint_leastN_t.For example, if uint_least64_t is a name for the type unsigned long long int,
then UINT64_C(0x123) might expand to the integer constant 0x123ULL.
Т.е, проще говоря, следует писать в define не 100000, a INT32_C(100000)
А определенное в файле stdint.h макро INT32_C(n) развернется в 100000 или 100000l в зависимости от длины целого типа в компиляторе.
E-mail: info@telesys.ru