Advertisement
Guest User

dla szewczyka

a guest
Feb 20th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cstdlib>
  4.  
  5. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  6.  
  7. using namespace std;
  8.  
  9. int main(int argc, char** argv) {
  10.  
  11. string line,x;
  12. fstream file;
  13.  
  14. file.open("z.txt", ios::in);
  15. if(file.good()==true)
  16. {
  17. while(!file.eof())
  18. {
  19. getline(file,line);
  20. x=line;
  21. }
  22. file.close();
  23. }
  24.  
  25. cout<<endl<<x;
  26. cout<<endl;
  27. cout<<endl<<"Zakres: ";
  28.  
  29.  
  30.  
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement