The warning you are getting has absolutely nothing to do with the fact that your array consists of long long
elements. The warning is issued either for your i
variable or for your N
. Most likely it is N
that's causing the problem. What is N
? How is it declared? I suspect it is also a long long
.
In C++ language the type that is used for specifying memory sizes (and, incidentally, array sizes and indices) is called size_t
. Apparently on your platform size_t
is synonymous with 32-bit unsigned int
type (32 bit platform?). The compiler is trying to convert your N
, which is apparently a 64-bit type, to size_t
and that triggers the warning.
In any case, there's absolutely no reason to insist on using long long
for i
or for N
. Choose a more reasonable type for both (or convert N
to that type) and the warning will disappear.
N
? – AnT