#include <iostream>
#include <fstream>
using namespace std;
int main()
{
char filename[60];
cout << "Enter name of data file: ";
cin.getline(filename, 60);
fstream duquFile;
ofstream xieruFile;
xieruFile.open("xieru.txt");
int num=0;
char c;
duquFile.open(filename, ios::in);
while (!duquFile.eof())
{
duquFile >> c;
xieruFile << c;
num++;
}
duquFile.close();
xieruFile.close();
cout << num << endl;
system("pause");
}
#include <fstream>
using namespace std;
int main()
{
char filename[60];
cout << "Enter name of data file: ";
cin.getline(filename, 60);
fstream duquFile;
ofstream xieruFile;
xieruFile.open("xieru.txt");
int num=0;
char c;
duquFile.open(filename, ios::in);
while (!duquFile.eof())
{
duquFile >> c;
xieruFile << c;
num++;
}
duquFile.close();
xieruFile.close();
cout << num << endl;
system("pause");
}