list4-2.cpp
来自「这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明」· C++ 代码 · 共 30 行
CPP
30 行
#include <string>
#include <iostream>
#include <string.h>
using namespace std;
void main(void)
{
string NewStr("explore new worlds..");
string::iterator F;
F = NewStr.begin();
string::reverse_iterator R;
R = NewStr.rbegin();
while(F != NewStr.end())
{
cout << *F ;
F++;
}
cout << endl;
while(R != NewStr.rend())
{
cout << *R ;
R++;
}
cout << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?