sprintf. McGraw-Hill The Complete Reference Fourth Edition
Annonce
Annonce
720
C + + : T h e C o m p l e t e R e f e r e n c e
The setvbuf( ) function returns zero on success, nonzero on failure.
A related function is setbuf( ).
sprintf
#include <cstdio> int sprintf(char * buf, const char *format, ...);
The sprintf( ) function is identical to printf( ) except that the output is put into the array pointed to by buf instead of being written to the console. See printf( ) for details.
The return value is equal to the number of characters actually placed into the array.
Related functions are printf( ) and fsprintf( ).
sscanf
#include <cstdio> int sscanf(const char * buf, const char *format, ...);
The sscanf( ) function is identical to scanf( ) except that data is read from the array pointed to by buf rather than stdin. See scanf( ) for details.
The return value is equal to the number of variables that were actually assigned values. This number does not include fields that were skipped through the use of the
* format command modifier. A value of zero means that no fields were assigned, and
EOF
indicates that an error occurred prior to the first assignment.
Related functions are scanf( ) and fscanf( ).
tmpfile
#include <cstdio>
FILE *tmpfile(void);
The tmpfile( ) function opens a temporary file for update and returns a pointer to the stream. The function automatically uses a unique filename to avoid conflicts with existing files.
The tmpfile( ) function returns a null pointer on failure; otherwise it returns a pointer to the stream.
Download
Annonce