Here is the documentation you provided:
Function: tempnam _tempnam
Synopsis
#include <stdio.h>
char *_tempnam(char *s);
Error MR.c: C:\Program Files\MATLAB\R2012a\sys\lcc\include\stdio.h: 189
redeclaration of `_tempnam' previously declared at MR.c 1
char * _tempnam(char *, char *);
Description
_tempnam creates a temporary filename for use in another directory. This
filename is different from that of any existing file. The prefix argument
(??) is the prefix to the filename. _tempnam uses malloc to allocate space
for the filename; the program is responsible for freeing this space when it
is no longer needed. _tempnam looks for the file with the given name in the
following directories, listed in order of precedence.
WHAT DIRECTORIES?
Returns
A pointer to the name generated or NULL if this fails. Note that this
function is not an ANSI C library function.
(WHY SHOULD IT BE? ANSI did not envisage the situation when tmpnam is
useless!)
Example FOR tmpfile !!!
#include <stdio.h>
int main( void )
{
FILE *stream;
int i;
/* Create temporary files. */
for( i = 1; i <= 4; i++ )
{
if( (stream = tmpfile()) == NULL ) {ďż˝
perror( "Could not open new temporary file" );
break;
}
else
printf( "Temporary file %d was created", i );
}
/* Remove temporary files. */
printf( "%d temporary files deleted", _rmtmp() );
return 0;
}
U�ytkownik napisa� w wiadomo�ci grup
dyskusyjnych:kl2pqj$6cv$1...@news.icm.edu.pl...