C ++ program to find if all occurrences of a character appear together in a string .
#include <iostream> NEW_LINE #include <string> NEW_LINE using namespace std ; bool checkIfAllTogether ( string s , char c ) {