std::string input;
bool new_sentence (true);
for (std::string::iterator it (input.begin()); it != input.end(); ++it)
{
if (new_sentence && std::isalpha (*it))
{
*it = std::toupper (*it);
new_sentence = false;
}
else if (*it == '.') // possibly more sentence separators
{
new_sentence = true;
}
}
Untested, unclear definition of "new sentence", not entirely sure, but probably a acceptable start.