返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;

  3. int main()
  4. {
  5. ifstream ifs;
  6. ifs.open("read.txt");
  7. ofstream ofs;
  8. ofs.open("write.txt");
  9. string str;
  10. getline(ifs,str);
  11. for(int i=0;i<str.length();i++)
  12. {
  13.     if(str[i]!='*')
  14.     {
  15.         ofs<<str[i];
  16.     }
  17. }
  18.     return 0;
  19. }
複製代碼

TOP

返回列表