Leer un archivo .txt y obtener sus datos linea por linea
#include <fstream> using namespace std; void readfile(string filename) { ifstream file(filename); string line; while (getline(file, line)) { // do something with line cout << line << endl; } file.close(); }