📄 addvex.cpp
字号:
#include"traffic.h"
step Addvex(ALGraph &G)
{
CityName add;
openfile("head");
if(G.vexnum == MAX_VERTEX_NUM)
{
printf("Full !!\n");
return NEXTSTEP;
}
printf("Please input the station name:\n");
scanf("%s",add);
getchar();
if(LocateVex(G,add) != -1)
{
printf("The station is exist!!");
}
else
{
strcpy(G.vertices[G.vexnum].data,add);
G.vertices[G.vexnum].firstarc = NULL;
G.vexnum ++;
printf("%s station add success!!\n",add);
}
return NEXTSTEP;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -