返回列表 發帖
本帖最後由 張絜晰 於 2024-3-15 20:17 編輯
  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 a=0;a<str.length();a++){
  12.         if(str[a]!='*'){
  13.             ofs<<str[a];
  14.         }
  15.     }
  16.     return 0;
  17. }
複製代碼
Attention Seeker </3

TOP

返回列表