-
-
Save parzibyte/7f77345fea4e45f711c8e0a7cd339ffc to your computer and use it in GitHub Desktop.
This file contains 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 <fstream> | |
using namespace std; | |
/* | |
https://parzibyte.me/blog | |
*/ | |
int main() { | |
string nombreArchivo = "videojuegos.txt"; | |
ifstream archivo(nombreArchivo.c_str()); | |
string linea; | |
// Obtener línea de archivo, y almacenar contenido en "linea" | |
while (getline(archivo, linea)) { | |
// Lo vamos imprimiendo | |
cout << "Una línea: "; | |
cout << linea << endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment