我怎樣才能得到這樣的功能:
string gg="13332";
gg.replace("333","");//gg="12"
? 我在標準庫上找不到任何東西。 編輯:我的功能:
bool isDalshe=false;
do{
isDalshe=false;
for(int i=0;i<10;i++){
for(int j=3;j<9;j++){
found=sk.find(mas[i][j].ch);
if(found!= std::string::npos){
glob_c+=mas[i][j].i;
cout<<"Found: "<<int(found)<<endl;
//In this place I need to replace "mas[i][j].ch" with "" in sk
isDalshe=true;
}
}}
}
while(isDalshe);
Thnaks!這正是我想要的。 – SevenDays
我認爲爲人們提供現成的解決方案,特別是那些參加比賽和競賽的人,是一個非常糟糕的主意。當他們長大後,我們必須與他們合作,並且我希望他們在來到這裏之前學習如何學習,並用愚蠢的錯誤破壞項目,因爲他們懶得去查找。 – littleadv
對於第一個我不是任何體育編程競賽的成員,第二個我沒有在互聯網上發現任何關於這個問題的任何信息,因爲我不知道需要替換的字符串的長度。 – SevenDays