//======================================================
// Sample file-IO in C++ (written by Stephanus)
//                          Thanks, Step. --hon-wai
//======================================================
//
// From: stephanu@comp.nus.edu.sg
// Sent: Wednesday, 10 March, 2004 10:14 PM
// To: leonghw@comp.nus.edu.sg
// Subject: C++ File I/O
// 
// Dear sir,
// I've just seen junbin's file I/O for C,as a complement this is C++ file I/O
//

#include <fstream>		// header is <fstream> not <iostream>
using namespace std;

#define fin  "TEST.IN"
#define fout "TEST.OUT"

int main()
{
	ifstream in(fin);
	// you can use the object "in"
	// as the same as cin, e.g :
	// int i;
	// in >> i;
	in.close();

	ofstream out(fout);
	// you can use the object "out"
	// as the same as cout, e.g :
	// int i = 4;
	// out << i;
	out.close();

	return 0;
}
