This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/tmpnm_s.c

20 lines
353 B
C
Raw Normal View History

#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
void main()
{
char filename[ L_tmpnam_s ];
FILE *fp;
errno_t rc;
rc = tmpnam_s( filename, sizeof( filename ) );
if( rc == 0 ) {
fp = fopen( filename, "w+b" );
/* . */
/* . */
/* . */
fclose( fp );
remove( filename );
}
}