C++字符串查找实例

2022-05-08

以下示例是关于Cpp中包含C++字符串查找实例用法的示例代码,想了解C++字符串查找实例的具体用法?C++字符串查找实例怎么用?C++字符串查找实例使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。

[英]:C++ String find Example源码类型:Cpp
#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