#include #include using namespace std ; int main() { set set1 ; set1.insert('G'); set1.insert('F'); set1.insert('G'); for (char ch1 : set1) { cout << ch1 << ' '; } cout << '\n'; if ( set1.count( 'G' ) > 0 ) cout << "G found in set. " << endl ; //another way if (set1.find('G') != set1.end() ) cout << "G found in set. " << endl ; set1.erase( 'G' ) ; if (set1.find('G') == set1.end() ) cout << "G not found in set. " << endl ; return 0; }