daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top