Top "Fgets" questions

Anything related to C or C++ standard library functions `fgets` (C) or `std::fgets` (C++). These functions are used to read a sequence of characters from an input stream and to write it into a character buffer as a string.

Open file and read from file Objective-c

I'm trying to open a file, and read from it.. but I'm having some issues. FILE *libFile = fopen("/Users/pineapple/…

objective-c fgets
How to prevent fgets blocks when file stream has no new data

I have a popen() function which executes tail -f sometextfile. Aslong as there is data in the filestream obviously I …

c popen fgets
How can I get a string from input without including a newline using fgets?

I'm trying to write an inputted string elsewhere and do not know how to do away with the new line …

c newline stdin fgets
fgets skip the blank line

I am writing a C program that use fgets to read in each line from a file. The problem is …

c fgets
Use of undefined constant STDIN - assumed 'STDIN' in C:\wamp\www\study\sayHello.php on line 5

I want to Learn php & mySQL and I purchased a book (php&mySql: the missing manuals 2edition) I …

php stdin trim fgets
Reading data from fsockopen using fgets/fread hangs

Here is the code that I am using: if (!($fp = fsockopen('ssl://imap.gmail.com', '993', $errno, $errstr, 15))) echo "…

php fread fgets fsockopen feof
strcmp on a line read with fgets

I'm trying to compare two strings. One stored in a file, the other retrieved from the user (stdin). Here is …

c string input fgets strcmp
How to use fgets if you don't know the number of characters to be read?

I need to read a file and send the text from it to a string so I can parse it. …

c++ c fstream fgets
How to detect empty string from fgets

I'm trying to detect the input of fgets from stdin as empty (when I press enter without entering in anything). …

c input fgets
fseek() by line, not bytes?

I have a script that parses large files line by line. When it encounters an error that it can't handle, …

php file fgets