stdio.ch
Declarations
Parameters
- filename (restrict) - file name to associate the file stream to @param mode (restrict) - null-terminated character string determining file access mode @return If successful, returns a pointer to the new file stream. The stream is fully buffered unless filename refers to an interactive device. On error, returns a null pointer. POSIX requires that errno be set in this case. @see https:en.cppreference.com/w/c/io/fopen
- mode (restrict) - null-terminated character string determining file access mode @return If successful, returns a pointer to the new file stream. The stream is fully buffered unless filename refers to an interactive device. On error, returns a null pointer. POSIX requires that errno be set in this case. @see https:en.cppreference.com/w/c/io/fopen
Returns
If successful, returns a pointer to the new file stream. The stream is fully buffered unless filename refers to an interactive device. On error, returns a null pointer. POSIX requires that errno be set in this case. @see https:en.cppreference.com/w/c/io/fopen
See Also
- https:en.cppreference.com/w/c/io/fopen
Parameters
- streamptr (restrict) - pointer to a pointer where the function stores the result (an out-parameter) @param filename (restrict) - file name to associate the file stream to @param mode (restrict) - null-terminated character string determining file access mode @return If successful, returns zero and a pointer to the new file stream is written to *streamptr. On error, returns a non-zero error code and writes the null pointer to *streamptr (unless streamptr is a null pointer itself). @see https:en.cppreference.com/w/c/io/fopen
- filename (restrict) - file name to associate the file stream to @param mode (restrict) - null-terminated character string determining file access mode @return If successful, returns zero and a pointer to the new file stream is written to *streamptr. On error, returns a non-zero error code and writes the null pointer to *streamptr (unless streamptr is a null pointer itself). @see https:en.cppreference.com/w/c/io/fopen
- mode (restrict) - null-terminated character string determining file access mode @return If successful, returns zero and a pointer to the new file stream is written to *streamptr. On error, returns a non-zero error code and writes the null pointer to *streamptr (unless streamptr is a null pointer itself). @see https:en.cppreference.com/w/c/io/fopen
Returns
If successful, returns zero and a pointer to the new file stream is written to *streamptr. On error, returns a non-zero error code and writes the null pointer to *streamptr (unless streamptr is a null pointer itself). @see https:en.cppreference.com/w/c/io/fopen
See Also
- https:en.cppreference.com/w/c/io/fopen
Parameters
- filename - file name to associate the file stream to @param mode - null-terminated character string determining new file access mode @param stream - the file stream to modify @return A copy of the value of stream on success, null pointer on failure. @see https:en.cppreference.com/w/c/io/freopen
- mode - null-terminated character string determining new file access mode @param stream - the file stream to modify @return A copy of the value of stream on success, null pointer on failure. @see https:en.cppreference.com/w/c/io/freopen
- stream - the file stream to modify @return A copy of the value of stream on success, null pointer on failure. @see https:en.cppreference.com/w/c/io/freopen
Returns
A copy of the value of stream on success, null pointer on failure. @see https:en.cppreference.com/w/c/io/freopen
See Also
- https:en.cppreference.com/w/c/io/freopen
Parameters
- filename - file name to associate the file stream to @param mode - null-terminated character string determining new file access mode @param stream - the file stream to modify @param newstreamptr - pointer to a pointer where the function stores the result (an out-parameter) @return zero on success (and a copy of the value of stream is written to *newstreamptr, non-zero on error (and null pointer is written to *newstreamptr unless newstreamptr is itself a null pointer). @see https:en.cppreference.com/w/c/io/freopen
- mode - null-terminated character string determining new file access mode @param stream - the file stream to modify @param newstreamptr - pointer to a pointer where the function stores the result (an out-parameter) @return zero on success (and a copy of the value of stream is written to *newstreamptr, non-zero on error (and null pointer is written to *newstreamptr unless newstreamptr is itself a null pointer). @see https:en.cppreference.com/w/c/io/freopen
- stream - the file stream to modify @param newstreamptr - pointer to a pointer where the function stores the result (an out-parameter) @return zero on success (and a copy of the value of stream is written to *newstreamptr, non-zero on error (and null pointer is written to *newstreamptr unless newstreamptr is itself a null pointer). @see https:en.cppreference.com/w/c/io/freopen
- newstreamptr - pointer to a pointer where the function stores the result (an out-parameter) @return zero on success (and a copy of the value of stream is written to *newstreamptr, non-zero on error (and null pointer is written to *newstreamptr unless newstreamptr is itself a null pointer). @see https:en.cppreference.com/w/c/io/freopen
Returns
zero on success (and a copy of the value of stream is written to *newstreamptr, non-zero on error (and null pointer is written to *newstreamptr unless newstreamptr is itself a null pointer). @see https:en.cppreference.com/w/c/io/freopen
See Also
- https:en.cppreference.com/w/c/io/freopen
Parameters
- stream - the file stream to close @return 0 on success, EOF otherwise @see https:en.cppreference.com/w/c/io/fclose
Returns
0 on success, EOF otherwise @see https:en.cppreference.com/w/c/io/fclose
See Also
- https:en.cppreference.com/w/c/io/fclose
Parameters
- stream - the file stream to write out @return Returns zero on success. Otherwise EOF is returned and the error indicator of the file stream is set. @see https:en.cppreference.com/w/c/io/fflush
Returns
Returns zero on success. Otherwise EOF is returned and the error indicator of the file stream is set. @see https:en.cppreference.com/w/c/io/fflush
See Also
- https:en.cppreference.com/w/c/io/fflush
Parameters
- stream - the file stream to set the buffer to @param buffer - pointer to a buffer for the stream to use. If a null pointer is supplied, the buffering is turned off @see https:en.cppreference.com/w/c/io/setbuf
- buffer - pointer to a buffer for the stream to use. If a null pointer is supplied, the buffering is turned off @see https:en.cppreference.com/w/c/io/setbuf
See Also
- https:en.cppreference.com/w/c/io/setbuf
Parameters
- stream - the file stream to set the buffer to @param buffer - pointer to a buffer for the stream to use or null pointer to change size and mode only @param mode - buffering mode to use. It can be one of the following values: _IOFBF full buffering _IOLBF line buffering _IONBF no buffering @param size - size of the buffer @return 0 on success or nonzero on failure. @see https:en.cppreference.com/w/c/io/setvbuf
- buffer - pointer to a buffer for the stream to use or null pointer to change size and mode only @param mode - buffering mode to use. It can be one of the following values: _IOFBF full buffering _IOLBF line buffering _IONBF no buffering @param size - size of the buffer @return 0 on success or nonzero on failure. @see https:en.cppreference.com/w/c/io/setvbuf
- mode - buffering mode to use. It can be one of the following values: _IOFBF full buffering _IOLBF line buffering _IONBF no buffering @param size - size of the buffer @return 0 on success or nonzero on failure. @see https:en.cppreference.com/w/c/io/setvbuf
- size - size of the buffer @return 0 on success or nonzero on failure. @see https:en.cppreference.com/w/c/io/setvbuf
Returns
0 on success or nonzero on failure. @see https:en.cppreference.com/w/c/io/setvbuf
See Also
- https:en.cppreference.com/w/c/io/setvbuf
Parameters
- buffer - pointer to the array where the read objects are stored @param size - size of each object in bytes @param count - the number of the objects to be read @param stream - the stream to read @return Number of objects read successfully, which may be less than count if an error or end-of-file condition occurs. If size or count is zero, fread returns zero and performs no other action. fread does not distinguish between end-of-file and error, and callers must use feof and ferror to determine which occurred.
- size - size of each object in bytes @param count - the number of the objects to be read @param stream - the stream to read @return Number of objects read successfully, which may be less than count if an error or end-of-file condition occurs. If size or count is zero, fread returns zero and performs no other action. fread does not distinguish between end-of-file and error, and callers must use feof and ferror to determine which occurred.
- count - the number of the objects to be read @param stream - the stream to read @return Number of objects read successfully, which may be less than count if an error or end-of-file condition occurs. If size or count is zero, fread returns zero and performs no other action. fread does not distinguish between end-of-file and error, and callers must use feof and ferror to determine which occurred.
- stream - the stream to read @return Number of objects read successfully, which may be less than count if an error or end-of-file condition occurs. If size or count is zero, fread returns zero and performs no other action. fread does not distinguish between end-of-file and error, and callers must use feof and ferror to determine which occurred.
Returns
Number of objects read successfully, which may be less than count if an error or end-of-file condition occurs. If size or count is zero, fread returns zero and performs no other action. fread does not distinguish between end-of-file and error, and callers must use feof and ferror to determine which occurred.
Parameters
- buffer - pointer to the first object in the array to be written @param size - size of each object @param count - the number of the objects to be written @param stream - pointer to the output stream @return The number of objects written successfully, which may be less than count if an error occurs. If size or count is zero, fwrite returns zero and performs no other action. @see https:en.cppreference.com/w/c/io/fwrite
- size - size of each object @param count - the number of the objects to be written @param stream - pointer to the output stream @return The number of objects written successfully, which may be less than count if an error occurs. If size or count is zero, fwrite returns zero and performs no other action. @see https:en.cppreference.com/w/c/io/fwrite
- count - the number of the objects to be written @param stream - pointer to the output stream @return The number of objects written successfully, which may be less than count if an error occurs. If size or count is zero, fwrite returns zero and performs no other action. @see https:en.cppreference.com/w/c/io/fwrite
- stream - pointer to the output stream @return The number of objects written successfully, which may be less than count if an error occurs. If size or count is zero, fwrite returns zero and performs no other action. @see https:en.cppreference.com/w/c/io/fwrite
Returns
The number of objects written successfully, which may be less than count if an error occurs. If size or count is zero, fwrite returns zero and performs no other action. @see https:en.cppreference.com/w/c/io/fwrite
See Also
- https:en.cppreference.com/w/c/io/fwrite
Parameters
- stream - to read the character from @return On success, returns the obtained character as an unsigned char converted to an int. On failure, returns EOF. If the failure has been caused by end-of-file condition, additionally sets the eof indicator (see feof()) on stream. If the failure has been caused by some other error, sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fgetc
Returns
On success, returns the obtained character as an unsigned char converted to an int. On failure, returns EOF. If the failure has been caused by end-of-file condition, additionally sets the eof indicator (see feof()) on stream. If the failure has been caused by some other error, sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fgetc
See Also
- https:en.cppreference.com/w/c/io/fgetc
Parameters
- str - pointer to an element of a char array @param count - maximum number of characters to write (typically the length of str) @param stream - file stream to read the data from @return str on success, null pointer on failure. If the end-of-file condition is encountered, sets the eof indicator on stream (see feof()). This is only a failure if it causes no bytes to be read, in which case a null pointer is returned and the contents of the array pointed to by str are not altered (i.e. the first byte is not overwritten with a null character). If the failure has been caused by some other error, sets the error indicator (see ferror()) on stream. The contents of the array pointed to by str are indeterminate (it may not even be null-terminated). @see https:en.cppreference.com/w/c/io/fgets
- count - maximum number of characters to write (typically the length of str) @param stream - file stream to read the data from @return str on success, null pointer on failure. If the end-of-file condition is encountered, sets the eof indicator on stream (see feof()). This is only a failure if it causes no bytes to be read, in which case a null pointer is returned and the contents of the array pointed to by str are not altered (i.e. the first byte is not overwritten with a null character). If the failure has been caused by some other error, sets the error indicator (see ferror()) on stream. The contents of the array pointed to by str are indeterminate (it may not even be null-terminated). @see https:en.cppreference.com/w/c/io/fgets
- stream - file stream to read the data from @return str on success, null pointer on failure. If the end-of-file condition is encountered, sets the eof indicator on stream (see feof()). This is only a failure if it causes no bytes to be read, in which case a null pointer is returned and the contents of the array pointed to by str are not altered (i.e. the first byte is not overwritten with a null character). If the failure has been caused by some other error, sets the error indicator (see ferror()) on stream. The contents of the array pointed to by str are indeterminate (it may not even be null-terminated). @see https:en.cppreference.com/w/c/io/fgets
Returns
str on success, null pointer on failure. If the end-of-file condition is encountered, sets the eof indicator on stream (see feof()). This is only a failure if it causes no bytes to be read, in which case a null pointer is returned and the contents of the array pointed to by str are not altered (i.e. the first byte is not overwritten with a null character). If the failure has been caused by some other error, sets the error indicator (see ferror()) on stream. The contents of the array pointed to by str are indeterminate (it may not even be null-terminated). @see https:en.cppreference.com/w/c/io/fgets
See Also
- https:en.cppreference.com/w/c/io/fgets
Parameters
- ch - character to be written @param stream - output stream @return On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputc
- stream - output stream @return On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputc
Returns
On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputc
See Also
- https:en.cppreference.com/w/c/io/fputc
Parameters
- ch - character to be written @param stream - output stream @return On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputc
- stream - output stream @return On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputc
Returns
On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputc
See Also
- https:en.cppreference.com/w/c/io/fputc
Parameters
- str - null-terminated character string to be written @param stream - output stream @return On success, returns a non-negative value. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputs
- stream - output stream @return On success, returns a non-negative value. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputs
Returns
On success, returns a non-negative value. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/fputs
See Also
- https:en.cppreference.com/w/c/io/fputs
Returns
The obtained character on success or EOF on failure. If the failure has been caused by end-of-file condition, additionally sets the eof indicator (see feof()) on stdin. If the failure has been caused by some other error, sets the error indicator (see ferror()) on stdin. @see https:en.cppreference.com/w/c/io/getchar
See Also
- https:en.cppreference.com/w/c/io/getchar
Parameters
- ch - character to be written @return On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stdout. @see https:en.cppreference.com/w/c/io/putchar
Returns
On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stdout. @see https:en.cppreference.com/w/c/io/putchar
See Also
- https:en.cppreference.com/w/c/io/putchar
Parameters
- str - character string to be written @return On success, returns a non-negative value. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/puts
Returns
On success, returns a non-negative value. On failure, returns EOF and sets the error indicator (see ferror()) on stream. @see https:en.cppreference.com/w/c/io/puts
See Also
- https:en.cppreference.com/w/c/io/puts
Parameters
- ch - character to be pushed into the input stream buffer @param stream - file stream to put the character back to @return On success ch is returned. On failure EOF is returned and the given stream remains unchanged. @see https:en.cppreference.com/w/c/io/ungetc
- stream - file stream to put the character back to @return On success ch is returned. On failure EOF is returned and the given stream remains unchanged. @see https:en.cppreference.com/w/c/io/ungetc
Returns
On success ch is returned. On failure EOF is returned and the given stream remains unchanged. @see https:en.cppreference.com/w/c/io/ungetc
See Also
- https:en.cppreference.com/w/c/io/ungetc
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
Returns
Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
See Also
- https:en.cppreference.com/w/c/io/fscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
Returns
Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
See Also
- https:en.cppreference.com/w/c/io/fscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
- ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
Returns
Number of receiving arguments successfully assigned (which may be zero in case a matching failure occurred before the first receiving argument was assigned), or EOF if input failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/fscanf
See Also
- https:en.cppreference.com/w/c/io/fscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
Returns
Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
See Also
- https:en.cppreference.com/w/c/io/fscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
Returns
Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
See Also
- https:en.cppreference.com/w/c/io/fscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- format - pointer to a null-terminated character string specifying how to read the input @param ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
- ... - receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
Returns
Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/fscanf
See Also
- https:en.cppreference.com/w/c/io/fscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
Returns
Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
See Also
- https:en.cppreference.com/w/c/io/vfscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
Returns
Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
See Also
- https:en.cppreference.com/w/c/io/vfscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
- vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
Returns
Number of receiving arguments successfully assigned, or EOF if read failure occurs before the first receiving argument was assigned. @see https:en.cppreference.com/w/c/io/vfscanf
See Also
- https:en.cppreference.com/w/c/io/vfscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
Returns
Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
See Also
- https:en.cppreference.com/w/c/io/vfscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
Returns
Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
See Also
- https:en.cppreference.com/w/c/io/vfscanf
Parameters
- stream - input file stream to read from @param buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- buffer - pointer to a null-terminated character string to read from @param format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- format - pointer to a null-terminated character string specifying how to read the input @param vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
- vlist - variable argument list containing the receiving arguments. The format string consists of non-whitespace multibyte characters except %: each such character in the format string consumes exactly one identical character from the input stream, or causes the function to fail if the next character on the stream does not compare equal. whitespace characters: any single whitespace character in the format string consumes all available consecutive whitespace characters from the input (determined as if by calling isspace in a loop). Note that there is no difference between "\n", " ", "\t\t", or other whitespace in the format string. conversion specifications. Each conversion specification has the following format: introductory % character. (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument. (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). conversion format specifier. @return Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
Returns
Same as (1-3), except that EOF is also returned if there is a runtime constraint violation. @see https:en.cppreference.com/w/c/io/vfscanf
See Also
- https:en.cppreference.com/w/c/io/vfscanf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer (not counting the terminating null character), or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer (not counting the terminating null character), or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer (not counting the terminating null character), or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer (not counting the terminating null character), or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer (not counting the terminating null character), or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters written to buffer (not counting the terminating null character), or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters (not including the terminating null character) which would have been written to buffer if bufsz was ignored, or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters (not including the terminating null character) which would have been written to buffer if bufsz was ignored, or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters (not including the terminating null character) which would have been written to buffer if bufsz was ignored, or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters (not including the terminating null character) which would have been written to buffer if bufsz was ignored, or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters (not including the terminating null character) which would have been written to buffer if bufsz was ignored, or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters (not including the terminating null character) which would have been written to buffer if bufsz was ignored, or a negative value if an encoding error (for string and character conversion specifiers) occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters transmitted to the output stream or negative value if an output error, a runtime constraints violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- format - pointer to a null-terminated byte string specifying how to interpret the data @param ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
- ... - arguments specifying data to print. If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined. If there are more arguments than required by format, the extraneous arguments are evaluated and ignored. @return The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
Returns
number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred. @see https:en.cppreference.com/w/c/io/fprintf
See Also
- https:en.cppreference.com/w/c/io/fprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
Returns
The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
Returns
The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
Returns
The number of characters written if successful or negative value if an error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed. @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed. @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed. @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed. @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return The number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed. @see https:en.cppreference.com/w/c/io/vfprintf
Returns
The number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed. @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
Returns
number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
Returns
number of characters transmitted to the output stream or negative value if an output error, a runtime constrants violation error, or an encoding error occurred. @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors @see https:en.cppreference.com/w/c/io/vfprintf
Returns
number of characters written to buffer, not counting the null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), or zero on runtime constraint violations, and negative value on encoding errors @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - output file stream to write to @param buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred @see https:en.cppreference.com/w/c/io/vfprintf
- buffer - pointer to a character string to write to @param bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred @see https:en.cppreference.com/w/c/io/vfprintf
- bufsz - up to bufsz - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred @see https:en.cppreference.com/w/c/io/vfprintf
- format - pointer to a null-terminated character string specifying how to interpret the data @param vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred @see https:en.cppreference.com/w/c/io/vfprintf
- vlist - variable argument list containing the data to print. The format string consists of ordinary byte characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format: introductory % character. (optional) one or more flags that modify the behavior of the conversion: -: the result of the conversion is left-justified within the field (by default it is right-justified). +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative). space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present. #: alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined. 0: for integer and floating-point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present. (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int, which appears before the argument to be converted and the argument supplying precision if one is supplied. If the value of the argument is negative, it results with the - flag specified and positive field width (Note: This is the minimum width: The value is never truncated.). (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int, which appears before the argument to be converted, but after the argument supplying minimum field width if one is supplied. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision. (optional) length modifier that specifies the size of the argument (in combination with the conversion format specifier, it specifies the type of the corresponding argument). conversion format specifier. @return number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred @see https:en.cppreference.com/w/c/io/vfprintf
Returns
number of characters not including the terminating null character (which is always written as long as buffer is not a null pointer and bufsz is not zero and not greater than RSIZE_MAX), which would have been written to buffer if bufsz was ignored, or a negative value if a runtime constraints violation or an encoding error occurred @see https:en.cppreference.com/w/c/io/vfprintf
See Also
- https:en.cppreference.com/w/c/io/vfprintf
Parameters
- stream - file stream to examine @return File position indicator on success or -1L if failure occurs. On error, the errno variable is set to implementation-defined positive value. @see https:en.cppreference.com/w/c/io/ftell
Returns
File position indicator on success or -1L if failure occurs. On error, the errno variable is set to implementation-defined positive value. @see https:en.cppreference.com/w/c/io/ftell
See Also
- https:en.cppreference.com/w/c/io/ftell
Parameters
- stream - file stream to examine @param pos - pointer to a fpos_t object to store the file position indicator to @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fgetpos
- pos - pointer to a fpos_t object to store the file position indicator to @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fgetpos
Returns
0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fgetpos
See Also
- https:en.cppreference.com/w/c/io/fgetpos
Parameters
- stream - file stream to modify @param offset - number of characters to shift the position relative to origin @param origin - position to which offset is added. It can have one of the following values: SEEK_SET, SEEK_CUR, SEEK_END @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fseek
- offset - number of characters to shift the position relative to origin @param origin - position to which offset is added. It can have one of the following values: SEEK_SET, SEEK_CUR, SEEK_END @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fseek
- origin - position to which offset is added. It can have one of the following values: SEEK_SET, SEEK_CUR, SEEK_END @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fseek
Returns
0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fseek
See Also
- https:en.cppreference.com/w/c/io/fseek
Parameters
- stream - file stream to modify @param pos - pointer to a fpos_t object to use as new value of file position indicator @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fsetpos
- pos - pointer to a fpos_t object to use as new value of file position indicator @return 0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fsetpos
Returns
0 upon success, nonzero value otherwise. @see https:en.cppreference.com/w/c/io/fsetpos
See Also
- https:en.cppreference.com/w/c/io/fsetpos
Parameters
- stream - file stream to modify @see https:en.cppreference.com/w/c/io/rewind
See Also
- https:en.cppreference.com/w/c/io/rewind
Parameters
- stream - the file to reset the error flags for @see https:en.cppreference.com/w/c/io/clearerr
See Also
- https:en.cppreference.com/w/c/io/clearerr
Parameters
- stream - the file stream to check @return nonzero value if the end of the stream has been reached, otherwise 0 @see https:en.cppreference.com/w/c/io/feof
Returns
nonzero value if the end of the stream has been reached, otherwise 0 @see https:en.cppreference.com/w/c/io/feof
See Also
- https:en.cppreference.com/w/c/io/feof
Parameters
- stream - the file stream to check @return Nonzero value if the file stream has errors occurred, 0 otherwise @see https:en.cppreference.com/w/c/io/ferror
Returns
Nonzero value if the file stream has errors occurred, 0 otherwise @see https:en.cppreference.com/w/c/io/ferror
See Also
- https:en.cppreference.com/w/c/io/ferror
Parameters
- s - pointer to a null-terminated string with explanatory message @see https:en.cppreference.com/w/c/io/perror
See Also
- https:en.cppreference.com/w/c/io/perror
Parameters
- pathname - pointer to a null-terminated string containing the path identifying the file to delete @return 0 upon success or non-zero value on error. @see https:en.cppreference.com/w/c/io/remove
Returns
0 upon success or non-zero value on error. @see https:en.cppreference.com/w/c/io/remove
See Also
- https:en.cppreference.com/w/c/io/remove
Parameters
- old_filename - pointer to a null-terminated string containing the path identifying the file to rename @param new_filename - pointer to a null-terminated string containing the new path of the file @return 0 upon success or non-zero value on error. @see https:en.cppreference.com/w/c/io/rename
- new_filename - pointer to a null-terminated string containing the new path of the file @return 0 upon success or non-zero value on error. @see https:en.cppreference.com/w/c/io/rename
Returns
0 upon success or non-zero value on error. @see https:en.cppreference.com/w/c/io/rename
See Also
- https:en.cppreference.com/w/c/io/rename
Returns
Pointer to the file stream associated with the file or null pointer if an error has occurred. @see https:en.cppreference.com/w/c/io/tmpfile
See Also
- https:en.cppreference.com/w/c/io/tmpfile
Parameters
- streamptr pointer to a pointer that will be updated by this function call @return Zero if the file was created and open successfully, non-zero if the file was not created or open or if streamptr was a null pointer. In addition, pointer to the associated file stream is stored in *streamptr on success, and a null pointer value is stored in *streamptr on error. @see https:en.cppreference.com/w/c/io/tmpfile
Returns
Zero if the file was created and open successfully, non-zero if the file was not created or open or if streamptr was a null pointer. In addition, pointer to the associated file stream is stored in *streamptr on success, and a null pointer value is stored in *streamptr on error. @see https:en.cppreference.com/w/c/io/tmpfile
See Also
- https:en.cppreference.com/w/c/io/tmpfile
Parameters
- filename - pointer to the character array capable of holding at least L_tmpnam bytes, to be used as a result buffer. If null pointer is passed, a pointer to an internal static buffer is returned. @param filename_s - pointer to the character array capable of holding at least L_tmpnam_s bytes, to be used as a result buffer. @param maxsize - maximum number of characters the function is allowed to write (typically the size of the filename_s array). @return filename if filename was not a null pointer. Otherwise a pointer to an internal static buffer is returned. If no suitable filename can be generated, null pointer is returned. @see https:en.cppreference.com/w/c/io/tmpnam
- filename_s - pointer to the character array capable of holding at least L_tmpnam_s bytes, to be used as a result buffer. @param maxsize - maximum number of characters the function is allowed to write (typically the size of the filename_s array). @return filename if filename was not a null pointer. Otherwise a pointer to an internal static buffer is returned. If no suitable filename can be generated, null pointer is returned. @see https:en.cppreference.com/w/c/io/tmpnam
- maxsize - maximum number of characters the function is allowed to write (typically the size of the filename_s array). @return filename if filename was not a null pointer. Otherwise a pointer to an internal static buffer is returned. If no suitable filename can be generated, null pointer is returned. @see https:en.cppreference.com/w/c/io/tmpnam
Returns
filename if filename was not a null pointer. Otherwise a pointer to an internal static buffer is returned. If no suitable filename can be generated, null pointer is returned. @see https:en.cppreference.com/w/c/io/tmpnam
See Also
- https:en.cppreference.com/w/c/io/tmpnam
Parameters
- filename - pointer to the character array capable of holding at least L_tmpnam bytes, to be used as a result buffer. If null pointer is passed, a pointer to an internal static buffer is returned. @param filename_s - pointer to the character array capable of holding at least L_tmpnam_s bytes, to be used as a result buffer. @param maxsize - maximum number of characters the function is allowed to write (typically the size of the filename_s array). @return Returns zero and writes the file name to filename_s on success. On error, returns non-zero and writes the null character to filename_s[0] (only if filename_s is not null and maxsize is not zero and is not greater than RSIZE_MAX). @see https:en.cppreference.com/w/c/io/tmpnam
- filename_s - pointer to the character array capable of holding at least L_tmpnam_s bytes, to be used as a result buffer. @param maxsize - maximum number of characters the function is allowed to write (typically the size of the filename_s array). @return Returns zero and writes the file name to filename_s on success. On error, returns non-zero and writes the null character to filename_s[0] (only if filename_s is not null and maxsize is not zero and is not greater than RSIZE_MAX). @see https:en.cppreference.com/w/c/io/tmpnam
- maxsize - maximum number of characters the function is allowed to write (typically the size of the filename_s array). @return Returns zero and writes the file name to filename_s on success. On error, returns non-zero and writes the null character to filename_s[0] (only if filename_s is not null and maxsize is not zero and is not greater than RSIZE_MAX). @see https:en.cppreference.com/w/c/io/tmpnam
Returns
Returns zero and writes the file name to filename_s on success. On error, returns non-zero and writes the null character to filename_s[0] (only if filename_s is not null and maxsize is not zero and is not greater than RSIZE_MAX). @see https:en.cppreference.com/w/c/io/tmpnam
See Also
- https:en.cppreference.com/w/c/io/tmpnam
See Also