[ create a new paste ] login | about

Link: http://codepad.org/c8VKQgM7    [ raw code | output | fork ]

C, pasted on Mar 1:
void begin(FILE *f, FILE *g)
{
    
    char c;
           
    fputs(openp, g);
    // fprintf(g, "%s\n", openp);
    while(!feof(f)) {
        c = fgetc(f);
        if(c == '\n')
        {
            fputs(closep, g);
            fputs(openp, g);
        }
        fputc(c, g);
        printf("%c ", c);
        
        
    }
    fputs(closep, g);
    
}
    


Output:
1
2
3
4
5
In function 'begin':
Line 6: error: 'openp' undeclared (first use in this function)
Line 6: error: (Each undeclared identifier is reported only once
Line 6: error: for each function it appears in.)
Line 12: error: 'closep' undeclared (first use in this function)


Create a new paste based on this one


Comments: