From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/io%2Fclearerr.html | 45 -------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 devdocs/c/io%2Fclearerr.html (limited to 'devdocs/c/io%2Fclearerr.html') diff --git a/devdocs/c/io%2Fclearerr.html b/devdocs/c/io%2Fclearerr.html deleted file mode 100644 index 0b82bfed3..000000000 --- a/devdocs/c/io%2Fclearerr.html +++ /dev/null @@ -1,45 +0,0 @@ -

clearerr

Defined in header <stdio.h>
void clearerr( FILE *stream );
-

Resets the error flags and the EOF indicator for the given file stream.

-

Parameters

- -
stream - the file to reset the error flags for

Return value

(none)

-

Example

#include <stdio.h>
-#include <assert.h>
- 
-int main(void)
-{
-    FILE* tmpf = tmpfile();
-    fputs("cppreference.com\n", tmpf);
-    rewind(tmpf);
- 
-    for (int ch; (ch = fgetc(tmpf)) != EOF; putchar(ch)) { }
- 
-    assert(feof(tmpf)); // the loop is expected to terminate by EOF
-    puts("End of file reached");
- 
-    clearerr(tmpf); // clear EOF
- 
-    puts(feof(tmpf) ? "EOF indicator set" 
-                    : "EOF indicator cleared");
-}

Output:

-
cppreference.com
-End of file reached
-EOF indicator cleared

References

See also

- - - -
checks for the end-of-file
(function)
displays a character string corresponding of the current error to stderr
(function)
checks for a file error
(function)
C++ documentation for clearerr
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/io/clearerr -

-
-- cgit v1.2.3