#include#include using namespace std;int main(int argc, char* argv[]){ string name("rockderia"); string firstname(name.substr(0,4)); cout << firstname << endl; system("pause");}
output:rock
本文共 293 字,大约阅读时间需要 1 分钟。
#include#include using namespace std;int main(int argc, char* argv[]){ string name("rockderia"); string firstname(name.substr(0,4)); cout << firstname << endl; system("pause");}
output:rock
转载于:https://www.cnblogs.com/Never-Land/p/9743574.html