✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
char s1 [] = "f1.txt"; char s2 [] = "f2.txt";
ifstream from (s1);
fstream to (s2, ios :: in | ios :: out);
char ch;
from.seekg ~;
from.get (ch);
to.seekp ~;
to.put (ch);
to.seekp (0);
while (to.get (ch))
cout << ch;
cout << endl;
(C++)