Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

c++問題~~幫忙一下

0 views
Skip to first unread message

尚未認證通過

unread,
Apr 19, 2003, 3:28:12 AM4/19/03
to

產生一個字串物件"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

0 new messages