Faster Computers Forums
FasterComputers.com
Quick Member Login:
Forgot password?
Forum Sponsors:
becomeasponsor



Test your Internet connection speed

becomeasponsor
Forum Statistics:
Forum Members: 152
Total Threads: 279
Total Posts: 1,225


There are 5 users
currently browsing forums.
You don't appear to be registered. Click here to register
Search the forums:

Faster Computers Forums » Hardware Forums » General Hardware » problem skipping user input

Notices

Reply
 
LinkBack Thread Tools Display Modes
Old 06-07-2009, 03:14 AM   #1 (permalink)
Noob Member
 
Join Date: Jun 2009
Posts: 25
PAPY2000 is on a distinguished road

Default problem skipping user input

I'm using C in my program (a big part of my issue already) and a part of it requires a user to enter a name to be read from a text file. I started by using fgets but that created issues in itself. I reverted to using scanf which saw an improvement but here's what happens:

There is a loop that asks the user if she wishes to read, write or delete. If I select read, it then asks how many names I want to read. Then it goes through a loop of asking for a name, calling a procedure and returning a result and will loop for the number of names I chose to read.
Now that exits, and it asks the user if she wants to continue, if yes, it loops back and asks for an option ("no" exits obviously). Now this time if I select read, it prompts for the number of names to read, i enter a number but then it skips asking for any names and goes straight to where it asks if I want to continue.
PAPY2000 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -4. The time now is 06:10 PM.
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd. Copyright © FasterComputers.com