|
|
От: |
Анатолий
|
|
| Дата: | 10.09.02 10:42 | ||
| Оценка: | |||
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
void main()
{
const char *array = "Hello! World! \n";
// копируем array в s
string s = string(array);
// удаляем пробелы
s.erase(remove(s.begin(),s.end(),' '), s.end());
cout << array;
cout << s << '\n';
}