What I am trying to do is get the first letter from a person's name using the substr function, and then change the letter to lowercase. This is my code to do that:
Code:firstLetter = final_last_name.substr(0, 1); firstLetter = static_cast<string>(tolower(firstLetter));
Every time I try to compile the program, it gives me this error message:
error C2664: 'tolower' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'int'
I am using the header file cctype for the function tolower, and I have tried changing that "char" inside the static cast to "string" since I am manipulating strings in this program, but nothing seems to budge.
Any ideas would be appreciated. Thanks.