I have this code
while (true)
{
cout << "Start typing: ";
cin >> input;
if (GetAsyncKeyState(VK_ESCAPE))
{
for (char& eachChar : input)
{
node = InitiateNode(eachChar);
LinkedListAddData(linkedList, node);
}
cout << "You type: " << endl;
PrintLinkedList(linkedList);
break;
}
}
I have problem like this. When I was in the cin typing function. Whenever I press ESC, it delete what I just type: For example: I type ABC, I press ESC it delete ABC. I don't want that. I want after I type ABC then I press ESC it run the code when I press the ESC.
Aucun commentaire:
Enregistrer un commentaire