正在制作菜单。我想使用箭头键从我的列表中进行选择。使用箭头键在控制台中导航
char move;
do
{
move = (char)_getch();
if (move == 38)
{
// Move Indicator Up
}
else if (move == 40)
{
// Move Indicator Down
}
}
while (move != 13);
我使用错误的ascii值的上下键吗?
解决
我取代(炭)_getch()至(INT)_getch()和焦炭移动到int移动 然后38和40 ??和80
是什么_getch()?我看到C#就像一个标签。 – Tigran
_getch()是什么? – hcb
您确定这是C#代码吗?根据你对'_getch'的调用,它看起来更像C# –