C++ 应用管理类无序列表跳转实现
void MainWidget::show() { m_list = list1; m_select = ''; while(1) { switch(m_list) { case list1: { List1 l1; l1.show(); m_list = list2; // 无序地跳转到list2 break; }
case list2:
{
List2 l2;
l2.show();
m_list = list1; // 无序地跳转回list1
break;
}
// case list3:
// {
// List3 l3;
// l3.show();
// m_list = goorder; // 无序地跳转到goorder
// break;
// }
// case goorder:
// {
// Goorder g;
// g.show();
// m_list = list1; // 无序地跳转回list1
// break;
// }
}
}
}
原文地址: https://www.cveoy.top/t/topic/pcfb 著作权归作者所有。请勿转载和采集!