...
Code Block | ||
---|---|---|
| ||
...
FILE *fp = fopen("foo.txt","r");
if( !fp ) { /* file does not exist */
fopen("foo.txt","w");
...
} else {
/* file exists */
fclose(fp);
}
...
|
...
...
Code Block | ||
---|---|---|
| ||
...
FILE *fp = fopen("foo.txt","r");
if( !fp ) { /* file does not exist */
fopen("foo.txt","w");
...
} else {
/* file exists */
fclose(fp);
}
...
|
...