addvex.cpp
来自「次界面好用但是也可能有许多不足还希望有贤人志士指点迷津!」· C++ 代码 · 共 27 行
CPP
27 行
#include"traffic.h"
status Addvex(ALGraph &G)
{
char add[16];
if(G.vexnum == MAX_VERTEX_NUM)
{
printf("Full !!\n");
/*getch(); */
return ERROR;
}
printf("Please input the station name:\n");
scanf("%s",add);
if(LocateVex(G,add) != -1)
{
printf("The station is exist!!");
return ERROR;
}
else
{
strcpy(G.vertices[G.vexnum].data,add);
G.vertices[G.vexnum].firstarc = NULL;
G.vexnum ++;
return OK;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?