Skip to content

Instantly share code, notes, and snippets.

@Ozoniuss
Created November 13, 2021 14:30
Show Gist options
  • Save Ozoniuss/cbbfe14016fb08871110d1304db7bf95 to your computer and use it in GitHub Desktop.
Save Ozoniuss/cbbfe14016fb08871110d1304db7bf95 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <fstream>
using namespace std;
int main() {
// Create and open a text file
ofstream MyFile("filename.txt");
// Write to the file
MyFile << "Files can be tricky, but it is fun enough!";
// Close the file
MyFile.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment