Skip to content

Instantly share code, notes, and snippets.

@marcoscastro
Created September 20, 2017 13:45
Show Gist options
  • Save marcoscastro/b208334566a1e0defeeeb06fdc7c9909 to your computer and use it in GitHub Desktop.
Save marcoscastro/b208334566a1e0defeeeb06fdc7c9909 to your computer and use it in GitHub Desktop.
C++ - Exemplo escrever no arquivo
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
string nome = "Dennis Ritchie";
ofstream out("arquivo.txt");
out << nome;
out.close();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment