Skip to content

Instantly share code, notes, and snippets.

@kolyadin
Created September 20, 2018 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolyadin/680b23e1eec81791265512a6cf2a274f to your computer and use it in GitHub Desktop.
Save kolyadin/680b23e1eec81791265512a6cf2a274f to your computer and use it in GitHub Desktop.
C++ simple create file
#include <iostream>
#include <fstream>
int main() {
std::ofstream outfile ("/path/to/dir/test.txt");
outfile << "my text here!" << std::endl;
outfile.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment