#include<iostream.h>
#include<fstream.h>
#include<LINK/graph/UBinGraph.h>

Graph  *LoadGraph(String);  	

void main(int argc, char *argv[])
{
	UBinGraph g1;
	ofstream fout;
	ifstream fin;

	fin.open(argv[1], ios::in);
	char ch;
	while (fin.get(ch))   cout.put(ch);
	fin.close();

	Graph *g = LoadGraph(argv[1]);
	fout.open("g2.g", ios::out);
	cout << *g << endl;
	g->saveToFile(&fout);
	fout.close();
	fin.open("g2.g", ios::in);
	while (fin.get(ch))   cout.put(ch);
	fin.close();
	
}
