#include <iostream>
using namespace std;
string remove_all_occurrences(string s, int ch) {
int j, len = s.length();
for (int i = j = 0; i < len; i++)
if (s[i] != ch)
s[j++] = s[i];
s[j] = '\0';
return s;
}
int main() {
string s = "c++ programming version 14";
string new_s = remove_all_occurrences(s, 'o');
cout << new_s;
}
/*
run:
c++ prgramming versin 14
*/