#include "File.h"

ifstream CFile::fin("Dat.bin", ios::binary);
//ifstream CFile::fin("Dat.txt");
//ofstream CFile::fout("Dat.bin", ios::binary);

vector<DataType>	CFile::datas;

bool CFile::ReadALL()
{
	DataType dat;
	datas.clear();
	fin.seekg(0L, ios::beg);
	while(fin.read((char *)(&dat), sizeof(DataType)))
	{
		datas.push_back(dat);
	}
	return true;
}
/*
bool CFile::Write()
{
	long count = 0;
	DataType dat;
	datas.clear();

	cout << "Start Read From Dat.txt" << endl;

	while(!fin.eof())
	{
		fin>>dat;
		++count;
		//cout << ++count << "\t" << dat << endl;
		datas.push_back(dat);
		fout.write((char *)(&dat), sizeof(DataType));
	}
	cout << count << endl;
	fin.close();
	fout.close();
	return true;
}
*/
