Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C temporary files

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
...
char temp_file[] = "/tmp/tmp.XXXXXX";
int fd = mkstemp(temp_file);
dprintf(fd, "Hello World!!!
");
close(fd);
Source by softwareengineering.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #C #temporary #files
ADD COMMENT
Topic
Name
5+1 =