АГ
Алексей Гаситашвили
А что значит "лишнее"? Две и более? Ну, как-то так:
#include
#include
#include
using namespace std;
bool op(char x, char y) { return x == 't' && y == 't'; }
int main() {
char s[71];
cout << "string? ";
cin.getline(s, 71);
*unique(s, s + strlen(s), op) = '\0';
cout << "result: " << s << endl;
}