【发布时间】:2013-12-04 00:49:30
【问题描述】:
我被卡住了,例如,我不确定如何使用 switch 语句将“DESKTOP”切换为“desktop”。
enum ComputerType { DESKTOP, LAPTOP, TABLET, HANDHELD };
// Prints a computer type as a lower case string.
// Use switch statement to implement this function.
// params: (in)
void PrintComputerType( ComputerType comp ) const
{
switch ( comp )
{
}
}
【问题讨论】:
标签: c++ switch-statement