![]() |
scanf, gets and fflush problems
This is the code:
Code:
/**********************************/After choosing "1", it does not stop at "Please enter the car name (CR to quit)". Thanks |
Re: scanf, gets and fflush problems
after each scanf you use add a getchar command
Code:
........ |
Re: scanf, gets and fflush problems
Thanks alot. This solved part of the problem and created another problem. Only the last typed characters are saved in the text file. I mean, if you keep chosing option 1 and type characters and again you choose option 1 and type characters, and then you leave the loop and check the text file, you will find that it only keeps the characters that were written in the last iteration.
|
Re: scanf, gets and fflush problems
Quote:
Code:
........... |
Re: scanf, gets and fflush problems
Yeah, this was perfect, it works. Now how I can write the "taxi registration number" - reg, to the text file.
Many Thanks |
| All times are GMT +5.5. The time now is 15:51. |