返回列表 發帖
  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 a;
  10.     getline(ifs,a);
  11.     for(int i=0;i<=a.length();i++)
  12.         if(a[i]!='*')
  13.             ofs<<a[i];
  14.     return 0;
  15. }
複製代碼

TOP

  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 a;
  10.     getline(ifs,a);
  11.     for(int i=0;i<=a.length();i++)
  12.         if(a[i]!='*')
  13.             ofs<<a[i];
  14.     return 0;
  15. }
複製代碼

TOP

返回列表