Advertisement
Guest User

Mk

a guest
Nov 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. int main(){
  5. ifstream entrada;
  6. char linea[800];
  7. entrada.open("datos.txt");
  8. if(entrada.good()){
  9. while(!entrada.eof()){
  10. entrada.getline(linea,256);
  11. cout<<linea<<endl;
  12. }
  13. }
  14. else {
  15. cout<<"No se puede leer"<<endl;
  16. } entrada.close();
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement