#include<iostream>
#include<fstream>
int main()
{
using namespace std;
ofstream fout;
fout.open("jar.txt");
cout << "Enter anything you want:\n";
char ch;
while (cin.get(ch)&&ch!='q')
fout << ch;
return 0;
}
#include<fstream>
int main()
{
using namespace std;
ofstream fout;
fout.open("jar.txt");
cout << "Enter anything you want:\n";
char ch;
while (cin.get(ch)&&ch!='q')
fout << ch;
return 0;
}