T
tings
for (int i=0;i < strlen(pathcmd);i++){//this line cause a warning
warning C4018: '<' : signed/unsigned mismatch
strlen returns a number of type 'size_t'. size_t is an unsigned type and
you are comparing it to an int, a signed type.
Two solutions to remove the warning:
1. Change the type of the variable 'i' to 'size_t'.
2. staic_cast i to "unsigned" type.
Which way is better in C++?
warning C4018: '<' : signed/unsigned mismatch
strlen returns a number of type 'size_t'. size_t is an unsigned type and
you are comparing it to an int, a signed type.
Two solutions to remove the warning:
1. Change the type of the variable 'i' to 'size_t'.
2. staic_cast i to "unsigned" type.
Which way is better in C++?