📄 fig19_03.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -