addvex.cpp
来自「次界面好用但是也可能有许多不足还希望有贤人志士指点迷津!」· C++ 代码 · 共 28 行
CPP
28 行
#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 + =
减小字号Ctrl + -
显示快捷键?