Скачиваний:
18
Добавлен:
01.05.2014
Размер:
820 б
Скачать
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include "funcs.h"
#include "classes.h"

int main(int argc, char* argv[])
{
FILE* File_In;
Graph* graph;

  clrscr();
	if (argc < 2){
   	cout<<"Less of argument..."<<endl;
		return -1;
   }

	if ( !(File_In = fopen(argv[1], "r")) ){
		cout<<"Error open file "<<argv[1]<<endl;
      return -1;
   }
   if (!Build_Graph(File_In, &graph)){
		clrscr();
      cout<<"Min ways...."<<endl;
      graph->Ways();
      cout<<endl<<"Press a key..."<<endl;
      getch();
      clrscr();
      cout<<endl<<"Z ways...."<<endl;
      graph->Z();
      cout<<endl<<"Press a key..."<<endl;
      getch();
   }
   else{
   	cout<<"Error creating graph. Check the describtion...";
      getch();
   }
   return 0;
}
Соседние файлы в папке lab5