Felanpro

Working with files

Apr 28th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream> //You have to include it when working with files!
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. ofstream FelixFile; //Creating an object file!/Acces to a file!
  9. FelixFile.open("felixfile.txt"); //If file don't exist create this file!
  10.  
  11. FelixFile << "Hello world!\n";
  12.  
  13. FelixFile.close();
  14.  
  15. return 0;
  16. }
Add Comment
Please, Sign In to add comment