From Game Editor
If an expression used with if is false, the part after else will be executed.
FILE *fp = fopen("myfile", "r+t");
if(fp)
{
strcpy(text, "The file exists.");
}
else
{
strcpy(text, "The file doesn't exixst");
}
fclose(fp);
If an expression used with if is false, the part after else will be executed.
FILE *fp = fopen("myfile", "r+t");
if(fp)
{
strcpy(text, "The file exists.");
}
else
{
strcpy(text, "The file doesn't exixst");
}
fclose(fp);