Created
September 20, 2017 13:45
-
-
Save marcoscastro/b208334566a1e0defeeeb06fdc7c9909 to your computer and use it in GitHub Desktop.
C++ - Exemplo escrever no arquivo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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