
Keith B. answered 06/28/19
Software Engineer and Math Geek
The range of a signed int goes from 32,767 to -32,767; what you are trying to print is a long value. The system knows this and because you have turned up the warning levels, it considers that an error. You're saying you want to print an integer, but instead you're trying to print a long.
You can find the range of the types in <limits.h> for c, <climits> for c++