停车场管理系统(C++)-创新互联

大二写的肯定会有很多很多很多缺点~希望大佬们能指出~给大家提供一个可以改的一个小东西,改成其他的什么什么也是可以的~有bug在评论区里说一下~952行~基本重要的都有注释~

在萍乡等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供做网站、网站设计 网站设计制作定制网站设计,公司网站建设,企业网站建设,品牌网站建设,营销型网站,成都外贸网站建设公司,萍乡网站建设费用合理。文章目录
      • 本“项目”实现了:
      • “项目”截图:
        • 入站:
        • 入候车场:
        • 出站及候车场自动入库
        • 查询:
        • 经营详情:
        • 退出系统:
  • 全部代码:

本“项目”实现了:

1.大中小车型分类
2.进场候车道
3.时间的自动提取
4.车牌的判定
5.查询、进车、出库、经营情况管理、自动收费系统、退出系统的销毁等等基础内容
6.停车场车辆的实时显示
7.拿走能三连一下嘛~
8.停车场用的顺序表候车道用的队列

“项目”截图: 入站:

在这里插入图片描述

入候车场:

在这里插入图片描述

出站及候车场自动入库

在这里插入图片描述

查询:

经营详情:

在这里插入图片描述

退出系统:

在这里插入图片描述

全部代码:

说明:本代码为UTF-8编码要是报错了就改改编码另存一下,在c站找找怎么办~ 贴贴~

#include#include#include#include#include#include#include#include// 车辆详情:
#define MaxSize 2

const double unitprice = 0.01;
using namespace std;
typedef struct
{int Tplace;
    string place;
    string time;
    string type;
    string license; // 车牌
    string provice; // 省份
    time_t current_time;
} peo;
// 总价钱
double totalPrice = 0;
// 车位的比较数组
int a[33] = {0};

string x1[6] = {""};
// 车牌号的比较数组
string x2[13] = {""};
vectorsplit(const string &str, const string &pattern);
void Getp(peo &e)
{// 输入停车位
    cout<< "停车位置:";
    int tplace;
    cin >>tplace;
    e.Tplace = tplace;
    e.place = e.type + "停车场" + to_string(tplace) + "号位";

    if ((e.Tplace >2 || e.Tplace< 1))
    {cout<< "该停车位不存在,请输入1~2的数字"<< endl;
        Getp(e);
    }
    else
    {for (int x = 0; x< 6; x++)
        {if (x1[x].compare(e.place) == 0)
            {cout<< "该停车位已被占用了哦~还请另找车位~"<< endl;
                Getp(e);
            }
        }
    }
}
void Getn(peo &e)
{// 输入车牌
    cout<< "车牌号码:";
    string indexL; // 暂时车牌

    cin >>indexL;
    int index = indexL.find("·"); // 能找到“·”;
    if (index == 3)
    {vectorTlicense = split(indexL, "·");
        if (Tlicense[0].length() == 3 && Tlicense[1].length() == 5)
        {string indexpro = indexL.substr(0, 2); // 找到省份;
            if (indexpro != "鲁" && indexpro != "京" && indexpro != "津" && indexpro != "冀" && indexpro != "晋" && indexpro != "蒙" && indexpro != "辽" && indexpro != "吉" && indexpro != "黑" && indexpro != "沪" && indexpro != "苏" && indexpro != "浙" && indexpro != "皖" && indexpro != "闽" && indexpro != "赣" && indexpro != "台" && indexpro != "豫" && indexpro != "鄂" && indexpro != "湘" && indexpro != "粤" && indexpro != "桂" && indexpro != "琼" && indexpro != "港" && indexpro != "澳" && indexpro != "渝" && indexpro != "川" && indexpro != "贵" && indexpro != "云" && indexpro != "藏" && indexpro != "陕" && indexpro != "甘" && indexpro != "青" && indexpro != "宁")
            {Getn(e);
                cout<< "输入车牌号的省份有错哦,本停车场还不支持外国哦"<< endl
          << endl;
            }
            else
            {if (indexL[2] >= 'A' && indexL[2]<= 'Z')
                {e.provice = indexpro;
                    e.license = indexL;
                }
                else
                {cout<< "车牌的第二位数要严格按照大写字母哦~不然就吃掉你!"<< endl
              << endl;
                }
            }
        }
        else
        {cout<< "输入车牌号有错哦,请按样例格式输入(样例:鲁N·88888)"<< endl
      << endl;
            Getn(e);
        }
    }
    else
    {cout<< "输入车牌号有错哦,请按样例格式输入(样例:鲁N·88888)"<< endl
  << endl;
        Getn(e);
    }

    for (int x = 0; x< 13; x++)
    {if (x2[x] == e.license)
        {cout<< "该牌车辆已在场,请重新确认您的车牌号后再输入哦~"<< endl;
            Getn(e);
        }
    }
}
void Gett(peo &e)
{// 输入时间
    cout<< "停车时间为:";
    e.current_time = time(NULL);
    e.time = ctime(&e.current_time);
    cout<< ctime(&e.current_time)<< endl<< endl;
}
void Settype(peo &e)
{// 输入类型
    cout<< "停车类型:";
    cin >>e.type;
    if (e.type.compare("大") != 0 && e.type.compare("中") != 0 && e.type.compare("小") != 0)
    {cout<< "车辆类型输入有误,请检查后重新输入哦~"<< endl;
        Settype(e);
    }
}
// 车牌
void Getn1(peo &e, string i)
{// 输入队列进的车牌
    e.license = i;
}
void Gettt1(peo &e)
{// 进队时间合体
    Getn(e);
    for (int x = 0; x< 13; x++)
    {if (x2[x] == "")
        {x2[x] = e.license;
            break;
        }
    }
}
void Get1(peo &e)
{// 时间位置号码合体
    Getp(e);
    Getn(e);
    Gett(e);
    for (int x = 0; x< 7; x++)
    {// 将信息记录入数组
        if (x1[x] == "")
        {x1[x] = e.place;
            break;
        }
    }
    for (int x = 0; x< 13; x++)
    {if (x2[x] == "")
        {x2[x] = e.license;
            break;
        }
    }
}
void Out1(peo &e)
{cout<< "停车位置:"<< e.place<< "  "<< "车辆类型:"<< e.type<< "  "<< "车牌号码:"<< e.license<< "  "<< "停车时间:"<< e.time<< endl;
}
void Gettt(peo &e) // 队列钱
{time_t etime = time(NULL);
    string endtime = ctime(&etime);
    int mtime = etime - e.current_time;
    double indexPrice = 0;
    int seconds = mtime;
    int hours = seconds / 3600;               // 计算小时数
    int remainingSeconds = seconds % 3600;    // 计算剩余的秒数
    int minutes = remainingSeconds / 60;      // 计算分钟数
    remainingSeconds = remainingSeconds % 60; // 计算剩余的秒数
    seconds = remainingSeconds;               // 秒数
    cout<< "本次停车于: "<< endl<< e.time<< "\b\b开始 "<< endl<< "于 "<< endtime<< "\b\b结束 "<< endl<< "共耗时 "<< hours<< " 小时 "<< minutes<< " 分 "<< seconds<< " 秒 。"<< endl;

    if (mtime<= 60)
    {cout<< "本次停车时间小于1分钟 免费!"<< endl;
    }
    else
    {cout<< "本停车场收费规则为每秒"<< unitprice<< "元~"<< endl;
        indexPrice = unitprice * mtime;
        cout<< "本次停车费用为:"<< indexPrice<< "元~"<< endl;
        totalPrice += indexPrice;
    }
}
// 分割字符串函数
vectorsplit(const string &str, const string &pattern)
{vectorret;
    if (pattern.empty())
        return ret;
    size_t start = 0, index = str.find_first_of(pattern, 0);
    while (index != str.npos)
    {if (start != index)
            ret.push_back(str.substr(start, index - start));
        start = index + 1;
        index = str.find_first_of(pattern, start);
    }
    if (!str.substr(start).empty())
        ret.push_back(str.substr(start));
    return ret;
}
// 车辆详情 end

// 排队等候队列

typedef string ElemType1;
typedef struct qnode
{ElemType1 data;
    struct qnode *next;
} DataNode;
typedef struct
{DataNode *front;
    DataNode *rear;
} LinkQuNode;

void InitQueue(LinkQuNode *&q)
{// 初始化
    q = new LinkQuNode();
    q->front = q->rear = NULL;
}
// 找找是否存在
bool findQueue(LinkQuNode *queue, ElemType1 data)
{DataNode *p = queue->front;
    while (p != NULL)
    {if (p->data == data)
        {return true;
        }
        p = p->next;
    }
    return false;
}
void DestroyQueue(LinkQuNode *&q)
{// 销毁
    DataNode *pre = q->front, *p;
    if (pre != NULL)
    {p = pre->next;
        while (p != NULL)
        {free(pre);
            pre = p;
            p = p->next;
        }
        free(pre);
    }
    free(q);
}
bool QueueEmpty(LinkQuNode *q)
{// 判断空否
    return (q->rear == NULL);
}
void EnQueue(LinkQuNode *&q, ElemType1 e)
{// 进队
    DataNode *p;
    p = new DataNode();
    p->data = e;
    p->next = NULL;
    if (q->rear == NULL)
        q->front = q->rear = p;
    else
    {q->rear->next = p;
        q->rear = p;
    }
}
bool DeQueue(LinkQuNode *&q, ElemType1 &e)
{// 出队
    DataNode *t;
    if (q->rear == NULL)
        return false;
    t = q->front;
    if (q->front == q->rear)
        q->front = q->rear = NULL;
    else
        q->front = q->front->next;
    e = t->data;
    free(t);
    return true;
}
int QueueLength(LinkQuNode *q)
{// 队列的长度
    int length = 0;
    if (QueueEmpty(q))
        return length;
    else if (!QueueEmpty(q))
    {DataNode *p;
        p = q->front;
        while (p)
        {length++;
            p = p->next;
        }
        return length;
    }
    return length;
}
void DispQueue(LinkQuNode *q) // 输出等待
{DataNode *t = q->front;
    while (t != NULL)
    {cout<< t->data<< endl
  << endl;
        t = t->next;
    }
}
// 排队等候队列 end
// 停车顺序表
typedef peo ElemType;
typedef struct
{ElemType data[MaxSize];
    int length;
} SqList;                 // 顺序表类型
void InitList(SqList *&L) // 初始化
{L = new SqList();
    L->length = 0;
    for (int i = 0; i< MaxSize; i++)
    {L->data[i].license = "";
    }
}

void DestroyList(SqList *&L) // 销毁
{free(L);
}
bool ListEmpty(SqList *L) // 检查空
{return (L->length == 0);
}
int ListLength(SqList *L) // 长度
{return (L->length);
}
void DispList(SqList *L) // 输出
{int i;
    if (ListEmpty(L))
    {cout<< "             当前类型停车位还没有车哦~"<< endl;
        return;
    }
    for (i = 0; i< L->length; i++)
        Out1(L->data[i]); // stu类型
    printf("\n");
}

bool GetElem(SqList *L, int i, ElemType &e) // 求值
{if (i< 1 || i >L->length)
        return false;
    e = L->data[i - 1];
    return true;
}

int LocateElem(SqList *L, ElemType e) // 查找
{int i = 0;
    while (i< L->length && L->data[i].license != e.license)
        i++;
    if (i >= L->length)
        return 0;
    else
        return i + 1;
}

bool ListInsert(SqList *&L, int i, ElemType e) // 插入
{int j;
    if (i< 1 || i >L->length + 1)
        return false;
    i--;
    for (j = L->length; j >i; j--)
        L->data[j] = L->data[j - 1];
    L->data[i] = e;
    L->length++;
    return true;
}

bool ListDelete(SqList *&L, int i, ElemType &e) // 删除
{int j;
    if (i< 1 || i >L->length)
        return false;
    i--;
    e = L->data[i];
    for (j = i; j< L->length - 1; j++)
        L->data[j] = L->data[j + 1];
    L->length--;
    return true;
}

// 获取车辆类型
int Gettype(peo &e, SqList *L, SqList *L1, SqList *L2)
{for (int i = 0; i< L->length; i++)
    {if (e.license == L->data[i].license)
        {return 0;
        }
    }
    for (int i = 0; i< L1->length; i++)
    {if (e.license == L1->data[i].license)
        {return 1;
        }
    }
    for (int i = 0; i< L2->length; i++)
    {if (e.license == L2->data[i].license)
        {return 2;
        }
    }
    return -1;
} // 0为大1为中2为小否则返回-1

// 停车顺序表end

int main()
{LinkQuNode *q1, *q2, *q3, *q1max, *q1min; // 队列

    SqList *L, *LMin, *LMax; // 链表停车场

    InitQueue(q1);    // 进队
    InitQueue(q2);    // 出队结算
    InitQueue(q3);    // 出队结算
    InitQueue(q1max); // 出队结算
    InitQueue(q1min); // 出队结算
    InitQueue(q3);    // 出队结算

    InitList(L);    // 链表中
    InitList(LMax); // 链表大
    InitList(LMin); // 链表小

    string type = "请输入汽车类型";
    string userCarNum;
    char i = 'F'; // 操作标识符

    int overBigNum = 0;
    int oversmallNum = 0;
    int overmidNum = 0;

    int sumCar[3] = {0};

    ElemType e, efind; // 车辆对象
    ElemType1 e1, e2;  // 队列自定类型对象
    int e3;
    int iiiType;
    // 系统主体
    cout<< "================欢迎使用c0re的停车场================"<< endl<< endl;
    cout<< "本停车场分为3个类型每个类型最多可停放2辆汽车"<< endl<< endl;
    cout<< "本停车场收费规则为每秒"<< unitprice<< "元~"<< endl<< endl;
    cout<< "来停车系统会自动记录时间"<< endl<< endl;
    cout<< "本停车场为三个类型分别配有能停放一个车辆的候车道"<< endl<< endl;
    while (i != 'E')
    {cout<< "====================c0re系统界面===================="<< endl
  << endl;

        cout<< "             当前已停放"<< ListLength(L) + ListLength(LMin) + ListLength(LMax)<< "辆汽车~"<< endl;

        cout<< "大型车位停放车辆情况"<< endl;
        DispList(LMax);
        cout<< "中型车位停放车辆情况"<< endl;
        DispList(L);
        cout<< "小型车位停放车辆情况"<< endl;
        DispList(LMin);
        if (!QueueEmpty(q1max))
        {// 候车区非空
            cout<< "当前大型车辆候车区停放的车辆有:"<< endl;
            DispQueue(q1max);
        }
        if (!QueueEmpty(q1))
        {// 候车区非空
            cout<< "当前中型车辆候车区停放的车辆有:"<< endl;
            DispQueue(q1);
        }
        if (!QueueEmpty(q1min))
        {// 候车区非空
            cout<< "当前小型车辆候车区停放的车辆有:"<< endl;
            DispQueue(q1min);
        }

        if (QueueEmpty(q1min) && QueueEmpty(q1) && QueueEmpty(q1max))
        {// 候车区空
            cout<< "候车区暂无车辆哦"<< endl;
        }
        cout<< "您可以选择:"<< endl
  << endl;
        cout<< " A:入站"
  << "  "
  << "D:出站"
  << "  "
  << "F:查询"
  << "  "
  << "M:经营详情"
  << "  "
  << "E:退出系统"<< endl
  << endl;
        cout<< "请选择:";
        cin >>i;
        switch (i)
        {case 'A':
            //
            cout<< "请输入您要停车的车辆的类型"<< endl
      << "(本停车场提供三种类型的车位请输入您的车辆类型)"<< endl
      << "输入“大”或“中”或“小”"<< endl;
            Settype(e);
            if (e.type.compare("大") == 0)
            {if (ListLength(LMax) == 2)
                {// 停车场大车顺序表长度满2
                    if (QueueLength(q1max) == 1)
                    {cout<< "     目前已无停放大车车位,且候车道已满还请另寻他处停车~"<< endl
                  << endl;
                        overBigNum++;
                    }
                    else if (QueueLength(q1max) != 1)
                    {cout<< "     目前无停放大车车位,还请在侯车道内等待~"<< endl
                  << endl;
                        Gettt1(e); // 车牌
                        e1 = e.license;
                        EnQueue(q1max, e1); // 进队等
                        sumCar[0]++;
                    }
                }
                else
                {if (ListLength(L) == 0 && ListLength(LMin) == 0 && ListLength(LMax) == 0)
                        cout<< "您是本停车场的第一位顾客^v^可以获得1亿元代金券!"<< endl;
                    else
                    {cout<< "当前已被使用的车位有:";
                        for (int x = 0; x< ListLength(LMax); x++)
                        {// 遍历显示被用的车位
                            for (int y = 0; y< 2; y++)
                            {if (LMax->data[x].place == x1[y])
                                    cout<< x1[y]<< " ";
                            }
                        }
                    }
                    cout<< endl
              << "请输入入站汽车的相关信息:"<< endl;
                    Get1(e); // 获取车牌车位时间
                    if (ListInsert(LMax, ListLength(LMax) + 1, e))
                    {cout<< "嘟噜噜~嘟噜噜~夸嚓,您的车已入库~~车主贴贴~"<< endl
                  << endl;
                        sumCar[0]++;
                    }
                    else
                    {cout<< "嘟噜噜~嘟噜噜~夸嚓,不知道出现了什么问题呢?小的正在火速debug中"<< endl
                  << endl;
                    } // 插入大停车场
                }
            }
            if (e.type.compare("中") == 0)
            {if (ListLength(L) == 2)
                {// 停车场大车顺序表长度满2
                    if (QueueLength(q1) == 1)
                    {cout<< "     目前已无停放中车车位,且候车道已满还请另寻他处停车~"<< endl
                  << endl;
                        overmidNum++;
                    }
                    else if (QueueLength(q1) != 1)
                    {cout<< "     目前无停放中车车位,还请在侯车道内等待~"<< endl
                  << endl;
                        Gettt1(e); // 车牌
                        e1 = e.license;
                        EnQueue(q1, e1); // 进队等
                        sumCar[1]++;
                    }
                }
                else
                {if (ListLength(L) == 0 && ListLength(LMin) == 0 && ListLength(LMax) == 0)
                        cout<< "您是本停车场的第一位顾客^v^可以获得1亿元代金券!"<< endl;
                    else
                    {cout<< "当前已被使用的车位有:";
                        for (int x = 0; x< ListLength(L); x++)
                        {// 遍历显示被用的车位
                            for (int y = 0; y< 2; y++)
                            {if (L->data[x].place == x1[y])
                                    cout<< x1[y]<< " ";
                            }
                        }
                    }
                    cout<< endl
              << "请输入入站汽车的相关信息:"<< endl;
                    Get1(e); // 获取车牌车位时间
                    if (ListInsert(L, ListLength(L) + 1, e))
                    {cout<< "嘟噜噜~嘟噜噜~夸嚓,您的车已入库~~车主贴贴~"<< endl
                  << endl;
                        sumCar[1]++;
                    }
                    else
                    {cout<< "嘟噜噜~嘟噜噜~夸嚓,不知道出现了什么问题呢?小的正在火速debug中"<< endl
                  << endl;
                    } // 插入大停车场
                }
            }
            if (e.type.compare("小") == 0)
            {if (ListLength(LMin) == 2)
                {// 停车场大车顺序表长度满2
                    if (QueueLength(q1min) == 1)
                    {cout<< "     目前已无停放小车车位,且候车道已满还请另寻他处停车~"<< endl
                  << endl;
                        oversmallNum++;
                    }
                    else if (QueueLength(q1min) != 1)
                    {cout<< "     目前无停放小车车位,还请在侯车道内等待~"<< endl
                  << endl;
                        Gettt1(e); // 车牌
                        e1 = e.license;
                        EnQueue(q1min, e1); // 进队等
                        sumCar[2]++;
                    }
                }
                else
                {if (ListLength(L) == 0 && ListLength(LMin) == 0 && ListLength(LMax) == 0)
                        cout<< "您是本停车场的第一位顾客^v^可以获得1亿元代金券!"<< endl;
                    else
                    {cout<< "当前已被使用的车位有:";
                        for (int x = 0; x< ListLength(LMin); x++)
                        {// 遍历显示被用的车位
                            for (int y = 0; y< 2; y++)
                            {if (LMin->data[x].place == x1[y])
                                    cout<< x1[y]<< " ";
                            }
                        }
                    }
                    cout<< endl
              << "请输入入站汽车的相关信息:"<< endl;
                    Get1(e); // 获取车牌车位时间
                    if (ListInsert(LMin, ListLength(LMin) + 1, e))
                    {cout<< "嘟噜噜~嘟噜噜~夸嚓,您的车已入库~~车主贴贴~"<< endl
                  << endl;
                        sumCar[2]++;
                    }
                    else
                    {cout<< "嘟噜噜~嘟噜噜~夸嚓,不知道出现了什么问题呢?小的正在火速debug中"<< endl
                  << endl;
                    } // 插入小停车场
                }
            }

            break;
            // 改到这里了!!!2022年12月20日
        case 'D':

            if (ListEmpty(L) && ListEmpty(LMin) && ListEmpty(LMax))
                cout<< "             没生意啊好心酸TvT~"<< endl;
            else
            {cout<< endl
          << "请输入要出站的车的车牌号:";
                ElemType i1;
                cin >>i1.license; // 车牌

                int Type = Gettype(i1, LMax, L, LMin);
                bool panduan = false;

                if (Type == 0)
                {panduan = ListDelete(LMax, LocateElem(LMax, i1), e);
                }
                else if (Type == 1)
                {panduan = ListDelete(L, LocateElem(L, i1), e);
                }
                else if (Type == 2)
                {panduan = ListDelete(LMin, LocateElem(LMin, i1), e);
                }
                else
                {panduan = false;
                }

                if (panduan)
                {// 查找并删除,e是被删的车s
                    cout<< "车牌号为"<< e.license<< "的汽车已驶入结算区~"<< endl;
                    e2 = e.license; // 获取车牌

                    cout<< "车牌为"<< e2<< "的车辆现进行费用结算~!"<< endl;
                    Gettt(e); // 算钱
                    cout<< "车牌号为"<< e2<< "的汽车已驶出停车场~~~!"<< endl;
                    for (int x = 0; x< 13; x++)
                    {// 出场的车销毁车牌
                        if (x2[x] == e2)
                        {x2[x] = "";
                            break;
                        }
                    }
                    // 改到这里了
                    if (Type == 0)
                    {if (!QueueEmpty(q1max))
                        {   // 进队列非空
                            DeQueue(q1max, e1); // 出队(车牌
                            Getn1(e, e1);       // 车牌获取
                            cout<< "车牌为"<< e.license<< "的车辆现可以入库~!还请确定入库时间:"<< endl;
                            Gett(e);                                   // 进场时间
                            ListInsert(LMax, ListLength(LMax) + 1, e); // 插入
                        }
                        else
                        {for (int x = 0; x< 6; x++)
                            {// 车位删除
                                if (x1[x] == e.place)
                                {x1[x] = "";
                                    break;
                                }
                            }
                        }
                    }
                    else if (Type == 1)
                    {if (!QueueEmpty(q1))
                        {// 进队列非空
                            DeQueue(q1, e1); // 出队(车牌
                            Getn1(e, e1);    // 车牌获取
                            cout<< "车牌为"<< e.license<< "的车辆现可以入库~!还请确定入库时间:"<< endl;
                            Gett(e);                             // 进场时间
                            ListInsert(L, ListLength(L) + 1, e); // 插入
                        }
                        else
                        {for (int x = 0; x< 6; x++)
                            {// 车位删除
                                if (x1[x] == e.place)
                                {x1[x] = "";
                                    break;
                                }
                            }
                        }
                    }
                    else if (Type == 2)
                    {if (!QueueEmpty(q1min))
                        {   // 进队列非空
                            DeQueue(q1min, e1); // 出队(车牌
                            Getn1(e, e1);       // 车牌获取
                            cout<< "车牌为"<< e.license<< "的车辆现可以入库~!还请确定入库时间:"<< endl;
                            Gett(e);                                   // 进场时间
                            ListInsert(LMin, ListLength(LMin) + 1, e); // 插入
                        }
                        else
                        {for (int x = 0; x< 6; x++)
                            {// 车位删除
                                if (x1[x] == e.place)
                                {x1[x] = "";
                                    break;
                                }
                            }
                        }
                    }
                }
                else
                {cout<< "不存在此车辆哦~请检查后重新输入~~"<< endl;
                }
            }

            break;
        case 'M':
            time_t rawtime;
            struct tm *timeinfo;

            time(&rawtime);
            timeinfo = localtime(&rawtime);
            char buffer[80];
            strftime(buffer, 80, "%Y年%m月%d日", timeinfo);

            cout<< "==============c0re停车场"<< buffer<< "经营详情============"<< endl
      << endl;
            cout<< "大车停车总计:"<< sumCar[0]<< "辆"<< endl
      << endl;
            cout<< "中车停车总计:"<< sumCar[1]<< "辆"<< endl
      << endl;

            cout<< "小车停车总计:"<< sumCar[2]<< "辆"<< endl
      << endl;

            cout<< "因大停车场满而未停车总计:"<< overBigNum<< "辆"<< endl
      << endl;
            cout<< "因中停车场满而未停车总计:"<< overmidNum<< "辆"<< endl
      << endl;
            cout<< "因小停车场满而未停车总计:"<< oversmallNum<< "辆"<< endl
      << endl;

            if (overBigNum != 0)
            {cout<< "建议多增加"<< overBigNum<< "辆大车位"<< endl
          << endl;
            }
            if (overmidNum != 0)
            {cout<< "建议多增加"<< overmidNum<< "辆中车位"<< endl
          << endl;
            }
            if (oversmallNum != 0)
            {cout<< "建议多增加"<< oversmallNum<< "辆小车位"<< endl
          << endl;
            }

            cout<< "$$$$$$$$$$$$$$$  目前已累计收入"<< totalPrice<< "元  $$$$$$$$$$$$$$$$"<< endl
      << endl;
            break;
        case 'E':
            cout<< endl
      << "     c0re竭诚为您服务,欢迎下次再来~"<< endl;

            // 销毁
            DestroyList(L);
            DestroyList(LMax);
            DestroyList(LMin);

            DestroyQueue(q1);
            DestroyQueue(q1max);
            DestroyQueue(q1min);

            DestroyQueue(q2);
            DestroyQueue(q3);
            break;
        case 'F':

            cout<< "欢迎来到c0re停车场的查询系统~"<< endl;
            cout<< "宝贝请输入爱车车牌号:";
            cin >>userCarNum;
            efind.license = userCarNum;
            iiiType = Gettype(efind, LMax, L, LMin);
            if (findQueue(q1max, userCarNum))
            {cout<< "您的爱车在大型车辆候车道~等大型停车场有车出来时您就可以进去了哦"<< endl
          << endl;
            }
            else if (findQueue(q1min, userCarNum))
            {cout<< "您的爱车在小型车辆候车道~等大型停车场有车出来时您就可以进去了哦"<< endl
          << endl;
            }
            else if (findQueue(q1, userCarNum))
            {cout<< "您的爱车在中型车辆候车道~等大型停车场有车出来时您就可以进去了哦"<< endl
          << endl;
            }

            else if (iiiType == 0)
            {GetElem(LMax, LocateElem(LMax, efind), efind);
                cout<< "您的爱车在大型车辆停车场~详细信息如下:"<< endl;
                Out1(efind);
            }
            else if (iiiType == 2)
            {GetElem(LMin, LocateElem(LMin, efind), efind);
                cout<< "您的爱车在小型车辆停车场~详细信息如下:"<< endl;
                Out1(efind);
            }
            else if (iiiType == 1)
            {GetElem(L, LocateElem(L, efind), efind);
                cout<< "您的爱车在中型车辆停车场~详细信息如下:"<< endl;
                Out1(efind);
            }
            else
            {cout<< "没有找到呢QWQ"<< endl;
            }

            break;

        default:
            cout<< "您的输入有误,请检查后重新输入~"<< endl;
        }
    }
    system("pause");
    return 0;
}

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧

新闻标题:停车场管理系统(C++)-创新互联
新闻来源:https://www.cdcxhl.com/article24/dhcgje.html

成都网站建设公司_创新互联,为您提供网站收录商城网站用户体验网站设计公司微信小程序云服务器

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都seo排名网站优化