what to do if i want to execute some statements in a loop till the user enters any key? i did this earlier but have forgotten the logic...
example:-

 while(1)
    {
      printf("abc");     /*i want this code infinitely, but as the user presses any                                            particular key it should stop the execution*/
    }

can i use bioskey in this program??? how to use that???

One way would be to use non-standard _kbhit() from conio.h

while( !_kbhit() )
{
  // do stuff here
}

thanks, that helped a lot......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.