How to solve error lossy convertion from int to char?

You can have an overflow when doing mathematic opetations between integers and chars, this can affect the expected result since that value is going to be assigned to a char… here you have

invr[len1++] = str[i]-32;

but you should cast to char like:

invr[len1++] = (char)(str[i]-32);

Leave a Comment

error code: 521