Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. string path;
  10. cout << "使うファイル名を打ち込むんじゃ・・→";
  11. cin >> path;
  12.  
  13. ifstream ifs("path");
  14. string str;
  15. while(getline(ifs, str))
  16. {
  17. cout << str << endl;
  18. }
  19.  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement