int number;
cout<<" Please select which item to change:"<<endl;
for(int i=0;i<=count;i++)
{
cout<<i<<" "<<v[i]->getName()<<endl;
}
cin>>i;
cout<<"Current number of items: "<<v[i]->getNumber()<<endl;
cout<<"Enter new value: "<<endl;
cin>>number;
这是在 switch 案例中,但程序当前在 for 循环之后终止。有任何想法吗?