The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
File managmnet 106
By Guest on 16th January 2023 12:36:54 PM | Syntax: TEXT | Views: 7



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. int main()
  5. {
  6.         fstream myfile;
  7.         myfile.open("methology.txt",fstream::out|fstream::app);
  8.         string line="this is appending at the end";
  9.  
  10.         myfile<<line;//myfile>>line;
  11.         cout<<line<<endl;      
  12.        
  13.        
  14.         myfile.close();
  15. }



  • Recent Pastes
  • Questions
    13 hours 54 mins 12 secs ago
  • Adrs
    13 hours 59 mins 22 secs ago
  • Docs
    14 hours 6 secs ago
  • Servs
    14 hours 49 secs ago
  • Srvs
    14 hours 5 mins 38 secs ago