Question: So i have implemented the game of life and now have to put every new generated field into a gif or pbm and at the end with a command I create an animated gif. 

The below function is given but I don't get the first parameter, a pointer const char? I see in the function that is the filename, but how do I write that, I'm really confused.

```
static int write_pbm_file(const char *fn, struct game_field *gf) {
int i, j;
FILE *fp;

fp = fopen(fn, "w+");
if(!fp){
    printf("unable to open '%s' - '%s'\n", fn, strerror(errno));

    return -1;
}

fprintf(fp, "P1\n");
fprintf(fp, "%c\n", gf->length);
fprintf(fp, "%c\n", gf->length);

for(i = 0; i < gf->length; i++)
    for(j = 0; j < gf->length; j++)
        fprintf(fp, "%c\n", gf->field[i][j] == 0 ? 48 : 
        gf->field[i][j] == 1 ? 219 : 197);

fclose(fp);

return 0; 
}

```

That's the code where I get to the above function: 

```
while( iterations > 0 ) {
    write_pbm_file(..., pstField);
    pstField = game_iteration(pstField);
    iterations--;
}

```

What should I write to create this files? Please help

Thank you!

Answer: 
There is no guaranteed way. 

Deferred name resolution (as in if a table isn't there, give an error) applies at compile time, not create time. Although there is [some evidence to show that code may run with missing tables](https://stackoverflow.com/q/4556304/27535)

It has been requested though: see the proposed [`SET OPTION STRICT ON`](http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=260762) MS Connect request which comes from [Erland Sommarskog](http://www.sommarskog.se/wishlist.html#strictchecks)
Please check my answer for the related question here:

[I'm looking for a reliable way to verify T-SQL stored procedures. Anybody got one?](https://stackoverflow.com/questions/2784866/im-looking-for-a-reliable-way-to-verify-t-sql-stored-procedures-anybody-got-on/27399350#27399350)

I have not checked it with 2 databases, but if worked fine for the objects in my single-database app.