Guest User

Untitled

a guest
Mar 13th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. freopen(CON,"r",stdin).
  2.  
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5. int main()
  6. {
  7. freopen("input.txt","r");
  8. string word;
  9. cin >> word;
  10. fclose(stdin);
  11. //?????????????????????????????????
  12. string word2;
  13. cin >> word2;
  14. cout << word << " " << word2;
  15.  
  16. }
  17.  
  18. #include <fstream>
  19.  
  20. // ...
  21.  
  22. std::ifstream file ("input.txt", std::ifstream::in);
  23. std::string word;
  24. file >> word;
  25. file.close(); // можно не делать если область жизни переменной file заканчивается
  26.  
  27. std::string word2;
  28. std::cin >> word2;
Add Comment
Please, Sign In to add comment