1 #include<iostream> 2 #include<fstream> 3 #include<string> 4 using namespace std; 5 int main(){ 6 fstream f("1.txt",ios::in|ios::out); 7 fstream ff("3.txt",ios::out); 8 string s; 9 while((!f.eof())){ 10 f>>s; 11 char d = ‘.‘; 12 int dian = s.find(d); 13 if(dian != string::npos) 14 { 15 ff<<s.substr(dian+1)<<endl; 16 } 17 } 18 return 0; 19 }