Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,540 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,509 people online right now. Registration is fast and FREE... Join Now!




controlin input from keyboard

 
Reply to this topicStart new topic

controlin input from keyboard

htsh_shrm
23 Nov, 2007 - 02:45 PM
Post #1

New D.I.C Head
*

Joined: 18 Oct, 2007
Posts: 25



Thanked: 1 times
My Contributions
CODE

printf("enter the variables");
sleep(5);
scanf("%d",&a);
scanf("%d",&b);


here the programme execution stops for 5 seconds at function sleep() but in between this time if i press enter key on the keyboard then aftr this time a null value is assigned to variable 'a' & the processor directly demands the value for variable 'b'........plz help to control this watever may be the key pressed by the user during the running of sleep() function...........
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/7/09 09:19PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month