字符串中find函數

洛谷1308 簡化版 1.find() 查找第一次出現的目標字符串: #include #include using namespace std; int main(){ string s1 = 「abcdef」; string s2 = 「de」; int ans = s1.find(s2) ; //在S1中查找子串S2 cout<<ans<<endl; system(「pause」); } 說
相關文章
相關標籤/搜索