Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Программы на лабораторные работы / lab5 / WAYS
.CPP#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;
}