How do I use fgets()? what is the syntax?
How do I use fgets()? what is the syntax?
Remember, if at first you don't succeed, destroy all evidence that you tried in the first place.
Code:if ( fgets ( buffer, size, stream ) != NULL ) { /* Good */ } else { /* EOF or error */ }
My best code is written with the delete key.
http://unixhelp.ed.ac.uk/CGI/man-cgi?fgets+3
Google is your friend!
Next time STFW
If you understand what you're doing, you're not learning anything.
look it up in a book! or search the internet or the faq board on this site.
You didn't even try looking on your own first did you?
http://msdn.microsoft.com/library/de...scmafgetws.asp
there is a link to the msdn documentation for fgets....that shows you how to use it. Next time don't be so lazy.
>You didn't even try looking on your own first did you?
>Next time don't be so lazy.
Not to sound rude, even though I am and have the full intention of doing so. But it's generally accepted practice to wait until you've gotten enough posts to earn a good reputation as someone who knows what he's doing before getting an attitude. You'll fare better with the mods if they like you, and you won't be seen as a troll by everyone else.
My best code is written with the delete key.