Advertisement
delvinkrasniqi

shkrim-lexim

May 31st, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1.  
  2.  
  3. #include "stdafx.h"
  4. #include <iostream>
  5. #include <iomanip>
  6. #include <fstream>
  7. #include <string>
  8. using namespace std;
  9.  
  10.  
  11.  
  12.  
  13. int _tmain(int argc, _TCHAR* argv[])
  14. {
  15. char a[11]={'h','e','l','l','o','t','h','e','r','e'};
  16.  
  17.  
  18. ofstream Shkruaj("D:/DELVINI/informatika.txt");
  19.  
  20. Shkruaj <<a<<endl;
  21.  
  22. cout <<"Te dhenat u shkruan me sukses"<<endl;
  23.  
  24. cout <<"\nFjali qe gjendet ne fajll";
  25.  
  26. string shkrimifinal;
  27.  
  28. ifstream Lexo("D:/DELVINI/informatika.txt", ios::in);
  29.  
  30. while (!Lexo.eof())
  31. {
  32. Lexo >> shkrimifinal;
  33.  
  34. cout <<shkrimifinal;
  35.  
  36. }
  37.  
  38. cout <<"Leximi perfundoi"<<endl;
  39. cin.get();
  40. cin.get();
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement