我使用此代碼來代替,而空間,但它永遠不會取代所有的白色空間可以ü請告訴我,我錯了代替空格++提高問題
#include <iostream>
#include <string>
#include <boost/regex.hpp>
#include<boost/algorithm/string.hpp>
#include<boost/algorithm/string/replace.hpp>
using namespace std;
int main(void)
{
string s4="Hai ad asdasd asdasd";
cout << boost::algorithm::replace_all_copy(s4, " ", " ");
}
看起來工作得很好,我... – Potatoswatter 2010-08-31 06:48:35