?? scandes.cpp
字號:
#include"traffic.h"
char Scandes(ALGraph G)
{
int m = -1,i,k;
char term[16],c = 'n';
ArcNode *p;
openfile("head");
printf("please input the terminus you want to scan:\n");
while(m == -1)
{
scanf("%s",term);
getchar();
m = LocateVex(G,term);
if(m == -1)
printf("there is not %s station please reput.\n",term);
}
for( i = 0;i < G.vexnum ;i++)
{
if(i != m)
{
for(p = G.vertices[i].firstarc; p && p->adjvex != m;p = p->nextarc);
if(p->adjvex == m&&p)
{
c = 'y';
if(p ->Tool[0])
{
printf("There are %d train lines from %s to %s:\n",p -> Tool[0] ->line,G.vertices[i].data,G.vertices[m].data);
for(k = 0 ;k < p -> Tool[0] ->line; k++)
printf("%d:%d\n", p -> Tool[0] ->starttime[k].hour, p -> Tool[0] ->starttime[k].minute);
}
if(p ->Tool[1])
{
printf("There are %d fly lines from %s to %s:\n",p -> Tool[1] ->line,G.vertices[i].data,G.vertices[m].data);
for(k = 0 ;k < p -> Tool[1] ->line; k++)
printf("%d:%d\n", p -> Tool[1] ->starttime[k].hour, p -> Tool[1] ->starttime[k].minute);
}
}
}
}
if(c == 'n')
printf("There is no train or fly to %s\n",term);
return getch();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -