There is a function:
void to_lower(char* s) { for (int i = 0; s[i] != '\0'; i++) if (s[i] >= 65 && s[i] < 90) { s[i] += 32; } } After the string "s [i] + = 32", it generates an error Segmentation fault.
There is a function:
void to_lower(char* s) { for (int i = 0; s[i] != '\0'; i++) if (s[i] >= 65 && s[i] < 90) { s[i] += 32; } } After the string "s [i] + = 32", it generates an error Segmentation fault.
Source: https://ru.stackoverflow.com/questions/861755/
All Articles
std::string. - VTT