產生一個字串物件"Now is the winter of our discontent"初值化.
寫一程式顯示此字串, 然後提示使用著輸入一個單字.若此單字出現在前
述的字串中,將此單字取代成"FOUND"並重新顯示字串.例 輸入"winter"
則顯示:"Now is the FOUND of our discontent".
我的c++很爛
//Program6.1 Replacing words in a string
#include<iostream>
#include<string>
int main()
char str[]="Now is the winter of our discontent."
再來是用哪一個?
insert erase replace
誰
可以幫我解答?
--
[m [1;32m※ 來源:‧蛋捲廣場 bbs.tku.edu.tw‧[FROM: 61.216.152.50] [m