fig19_03.cpp
来自「经典vc教程的例子程序」· C++ 代码 · 共 17 行
CPP
17 行
// Fig. 19.3: fig19_03.cpp
// Demonstrating function substr
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s( "The airplane flew away." );
// retrieve the substring "plane" which
// begins at subscript 7 and consists of 5 elements
cout << s.substr( 7, 5 ) << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?