Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int number, char *name[])
- {
- int index=0;
- int nodes[2];
- nodes[0]=0;
- nodes[1]=0;
- if(1==number)
- {
- printf("Nie podano nazwy pliku\n");
- openFile("testy.txt");
- }
- else
- {
- int i=1;
- while(i<number)
- {
- if(name[i][0]=='-')
- {
- if(name[i][1]=='f')
- {
- openFile(name[++i]);
- i++;
- }
- else if(name[i][1]=='p')
- {
- if(first)
- {
- while(index!=2)
- {
- nodes[index]=convertCharToInt(name[++i]);
- index++;
- }
- index=0;
- i++;
- clear_visited();
- printPath(nodes[0], nodes[1]);
- }
- else printf("Graf nie zostal jeszcze utworzony!\n");
- }
- }
- else
- {
- printf("ZLE PODANE ARGUMENTY!\n");
- printf("WPISZ '-f nazwapliku', by otworzyc plik.\n");
- printf("'-p' i numery wierzcholkow, by znalezc dla nich droge.\n");
- break;
- }
- //i++;
- }
- }
Add Comment
Please, Sign In to add comment