C++
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
28
1
2
3
4
using std::cout;
5
using std::endl;
6
using std::string;
7
using std::vector;
8
9
string removeHsfromRWMol( string smile_lines);
10
string removeHsfromRWMol( string smile_lines){
11
vector<string> final_strings;
12
cout <<"lol"<<endl;
13
for (size_t i=0 ; i < smile_lines.size(); ++i) {
14
cout <<"lol"<<endl;
15
cout <<smile_lines[i]<<endl;
16
if (smile_lines[i] == '[' || smile_lines[i] == 'H' || smile_lines[i] == ']' ) {
17
smile_lines.erase(i);
18
cout << smile_lines << endl;
19
}
20
}
21
return smile_lines;
22
}
23
24
int main(void) {
25
removeHsfromRWMol("aaa[bbb");
26
return 0;
27
}
28
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-10.1.0/include -std=gnu++2a
Start
lol lol a lol a lol a lol [ aaa
0
Finish