items.size()
returns a
std::size_t
, usually a 64-bit unsigned int, and
j
is a signed int. The compiler warns you for that, because you compare
j
with
items.size()
. Make
j
and
i
an unsigned long (an unsigned 64-bit int).
unsigned long i=0;
for(unsigned long j=2; j<items.size(); j++){