go
3587 / 1367 / 130
Регистрация: 16.04.2009
Сообщений: 4,527
|
13.01.2012, 13:43
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #include <iostream>
#include <algorithm>
#include <string>
int main ()
{
std::string s (" He llo world ");
size_t found;
while ( (found = s.find (' ')) != std::string::npos )
s.erase (s.begin () + found);
std::cout << s << std::endl;
return 0;
} |
|
http://liveworkspace.org/code/6ed54124fe41ee5947128ab198b33aa5
1
|