+ 1

File in c++

How to open and read file like input (cin) and print output in other document?

16th Apr 2018, 12:47 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
6 ответов
0
cout?!
16th Apr 2018, 12:55 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
0
ok ти рус?
16th Apr 2018, 12:57 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
- 2
#include "iostream" #include "string" #include "fstream" using namespace std; int main() { ifstream in("/sdcard/C++/username_password.cxx"); ofstream out("/sdcard/C++/Test.txt"); string s; while (getline(in, s)) { out << s << "\n"; } }
16th Apr 2018, 12:54 PM
Aidos Zhakupov
Aidos Zhakupov - avatar
- 2
нет просто out
16th Apr 2018, 12:57 PM
Aidos Zhakupov
Aidos Zhakupov - avatar
- 2
Qazaq
16th Apr 2018, 12:58 PM
Aidos Zhakupov
Aidos Zhakupov - avatar