C++为何调试的时候发现存入的数据弹不出来,并且栈区是空的?

2025-02-24 22:02:17
推荐回答(1个)
回答1:

case 'A':
case'a':
cout << "Enter a PO number to add:";
cin >> po;
//判断栈区是否已经满了
if (st.isfull())
cout << "栈区已经满了\n";
//将数据存入栈区中
else
st.push(po);
break;
诺,最后一行漏了一个break;