棂屿失梦 2021-10-14 09:37 采纳率: 100%
浏览 19
已结题

停车场问题,车进入的那个函数jinru有问题

#includeusing namespace std;typedef struct{ string data[20][3]; int top;}SeqStack;typedef struct{ string data[40][3]; int rear, front;}SeQueue;SeqStack* s, * ss;SeQueue* q;SeqStack* Init_SeqStack(SeqStack* s){ s = (SeqStack*)malloc(sizeof(SeqStack)); s->top = -1; return s;}int Empty_SeqStack(SeqStack* s){ if (s->top == -1) return 1; else return 0;}int Push_SeqStack(SeqStack* s, string a[3]){ if (s->top == 19) return 0; else { s->top++; s->data[s->top][0]= a[0]; s->data[s->top][1] = a[1]; s->data[s->top][2] = a[2]; return 1; }}string* Pop_SeqStack(SeqStack* s){ string c[3]; c[0] = s->data[s->top][0]; c[1] = s->data[s->top][1]; c[2] = s->data[s->top][2]; s->top--; return c;}int jinru(SeqStack* s,SeQueue* q){ string message, id, time; string a[3],b[3]; cout << "please input message" << endl; cin >> message; cout << "please input id" << endl; cin >> id; cout << "please input time" << endl; cin >> time; a[0] = message; a[1] = id; a[2] = time; if (s->top == 19) { q->rear+


- 
- 


  • 写回答

1条回答 默认 最新

  • qfl_sdu 2021-10-14 09:38
    关注

    代码没贴全,代码用代码段贴

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 10月22日
  • 已采纳回答 10月14日
  • 创建了问题 10月14日

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?