New course! Every coder should learn Generative AI!
Try a free lesson+ 1
The ASCII value of enter key is 13..we can check the status of enter key press using getch() and ASCII value....
Char ch;
cout<<"enter keys";
ch=getch();
if(ch==13)
cout<<"enter key pressed";
else
cout<<"key pressed is not enter key";