
Envoyé par
jack_x4
1 2
|
unsigned long long test = 10000000000; //2002056207840 |
le compilateur renvoie : 33 ...\..\..x.c [Warning] integer constant is too large for "long" type
Normal, par défaut les constantes numériques sont de type int. Si tu veux autre chose, il faut être plus précis :
unsigned long long test = 10000000000ull;
Rappel :
1 2 3 4 5 6 7 8 9 10
|
1 : int
1u : unsigned int
1l : long
1ul : unsigned long
1f : float
1. : double
[C99]
1ll : long long
1ull : unsigned long long |
Il n'est pas inutile d'ouvrir son livre de C de temps en temps...
Partager