LETTURA FILE

mail@pastecode.io avatar
unknown
plain_text
2 years ago
297 B
7
Indexable
Never
#include <stdio.h>
#include <iostream>
#include <fstream>
using namespace std;

//il nostro file si chiama "ciao.txt"

int main(){
    string line;
    ifstream fin("ciao.txt");
    
    while(!fin.eof()){
        getline(fin, line);
        cout<<line<<endl;
    }
   fin.close();
   return 0;
}