#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
#include <cctype>
int main()
{
std::list<char> lt{'5', 'a', 'c','g', '7', 't', '!'};
std::cout << std::endl;
std::copy(lt.begin(), lt.end(), std::ostream_iterator<char>(std::cout, " "));
lt.remove_if([](char& var1)
return !(std::tolower(var1, std::locale()) >= 'a' && std::tolower(var1, std::locale()) <= 'z');
});
}
#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
#include <cctype>
int main()
{
std::list<char> lt{'5', 'a', 'c','g', '7', 't', '!'};
std::cout << std::endl;
std::copy(lt.begin(), lt.end(), std::ostream_iterator<char>(std::cout, " "));
lt.remove_if([](char& var1)
{
return !(std::tolower(var1, std::locale()) >= 'a' && std::tolower(var1, std::locale()) <= 'z');
});
std::cout << std::endl;
std::copy(lt.begin(), lt.end(), std::ostream_iterator<char>(std::cout, " "));
}