一个剩余串排列的问题
#include <iostream>
#include <string>
#include <fstream>
#include <algorithm>
using namespace std;
int main()
{
ifstream in("remainder.txt");
for(string s,t,u;in>>s>>t;u="")
{
sort(s.begin(),s.end());
sort(t.begin(),s.end());
set_difference(s.begin(),s.end(),t.begin(),t.end(),back_inserter(u));
cout<<u<<endl;
}
return 0;
}
这道程序怎么错了,先假定文件remainder.txt在当前目录下已经存在,这个也无关紧要,关键是这道程序怎么有运行错误咯?