鍍金池/ 問答/C  C++/ C++ string 的 find

C++ string 的 find

string str = "abcd";
cout << str.find("dcba", 0, 1);
輸出3

但是我想要的是在 模式串"dcba"找一個最近的,這里也就是 'a',這該怎么實現(xiàn)呢?

回答
編輯回答
孤酒
2017年11月15日 23:10