K12教育赛事综合服务平台
聚乐之家官方网站
下载聚乐之家官方App
专注青少年竞赛题库网站
#include <iostream> #include <string> using namespace std; int main() { string str = "Hello,World!"; string sub1 = str.substr(7, 5); int pos = str.find("Wo"); cout << sub1 << pos << endl; return 0; }
orld!6
World6
orld!7
World!6