79106666

Date: 2024-10-20 08:50:01
Score: 1
Natty:
Report link

I had made a console text editor, in which I had to detect ctrl+s to save the document. My code was something like this:

int d;
while(true){
  if(_kbhit()){
    d=_getch();
    if(d==19){
      // code for when ctrl+s is hit  
    }
    // condition for other keys
  }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Umer Baig