I am new to c programming I am working on a code which requires the program to keep running until i hit a specific key(not with enter but with just one button)
For example-
My code keeps on printing "Hello World"
Hello world
Hello world
Hello world
Hello world
Hello world
.
.
.
As soon as i press a button say the letter A then the program should stop.
I tried using getch();
But it will pause the code until i hit a character and then goes to the next line.
How do i overcome this.
Can someone please help.