Answers for "C++ String find Example"

C++
1

C++ String find Example

#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;   
}
Posted by: Guest on May-05-2022

Browse Popular Code Answers by Language