Skip to content

Commit 3b852a4

Browse files
reverse_iterator.cpp
1 parent f872983 commit 3b852a4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

reverse_iterator.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main()
6+
{
7+
string s = "hello world";
8+
for(string::reverse_iterator rit = s.rbegin(); rit!=s.rend(); rit++){
9+
cout << *rit;
10+
}
11+
cout << endl;
12+
return 0;
13+
}

0 commit comments

Comments
 (0)