a newbie gcc compiler and c language question
- by dydx
Hi, when I'm trying to compile my c program it gives me this error warning: integer constant is too large for 'long' type
which refers to these lines
int barcode, a, b, c;
scanf("%d", &barcode);
a = barcode / 1000000000000;
b = barcode / 100000000000 % 10;
c = barcode / 10000000000 % 10;
and the rest is fine. I know I'm not supposed to use int for such a large number, any suggestions on what I should use? if I replace int with double what should the '%d' part be replaced with then?