以下示例是关于Cpp中包含C++字符串查找实例用法的示例代码,想了解C++字符串查找实例的具体用法?C++字符串查找实例怎么用?C++字符串查找实例使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。
#include<iostream>
using namespace std;
int main()
{
string str= "Welcome to Softhunt.net Tutorial Website";
cout << str<<'\n';
cout <<" Position of the 'to' word is :";
cout<< str.find("to");
return 0;
}
本文地址:https://www.itbaoku.cn/snippets/785465.html