dev c++ 的boost库的安装步骤
然后点击“check for updates”按钮
最后点击“Download selected”按钮,下载完成后安装....
给dev添加boost库文件,找到之前安装的目录
#include<iostream> #include<string> #include<cstring> #include<list> #include<map> #include<boost/regex.hpp> int main(){string s = "1+1=2", first, second;boost::regex re("=");boost::sregex_token_iterator begin(s.begin(),s.end(),re,-1), end;if(begin != end){first = *begin; ++begin;}if(begin != end){second = *begin;++begin;}cout<<first<<" "<<second<<endl;return 0; }