Generation

generate functionThu, 11 May 2023

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(); }

Questions about programming?Chat with your personal AI assistant