Home > Back-end >  For warning C4018: "<" : a signed/unsigned do not match
For warning C4018: "<" : a signed/unsigned do not match

Time:10-13

Case ID_NAT_REQUEST_BOUND_ADDRESSES:
{
RakNet: : BitStream outgoingBs;
OutgoingBs. Write (MessageID ID_NAT_RESPOND_BOUND_ADDRESSES);

If (boundAddresses [0]==UNASSIGNED_SYSTEM_ADDRESS)
{
DataStructures: : ListRakPeerInterface - & gt; GetSockets (sockets);
for (int I=0; I & lt; Sockets. The Size () & amp; & I & lt; MAXIMUM_NUMBER_OF_INTERNAL_IDS; I++)
{
BoundAddresses [I]=sockets [I] - & gt; GetBoundAddress ();
BoundAddressCount++;
}
}

OutgoingBs. Write (boundAddressCount);
for (int i=0; I & lt; BoundAddressCount; I++)
{
OutgoingBs. Write (boundAddresses [I]);
}

RakPeerInterface - & gt; Send (& amp; OutgoingBs HIGH_PRIORITY, RELIABLE_ORDERED, 0, packet - & gt; SystemAddress, false);
}

The red part is positioning the code to the
Could you tell me how to write this paragraph should be repaired

CodePudding user response:

int i=0; -> Size_t I;

CodePudding user response:


Changed a lot of new grammar mistakes

CodePudding user response:

For (size_t I=0; I & lt; Sockets. The Size () & amp; & I & lt; MAXIMUM_NUMBER_OF_INTERNAL_IDS; i++)

CodePudding user response:

Specific what type size_t Microsoft didn't say, but you can be interpreted as an unsigned int type
  • Related