void reverse() { struct listNode *p, *q, *r; p = head; q = NULL; while( p != NULL ) { r = q; q = p; p = p->nextPtr; q->nextPtr = r; } head = q; }
Standard input is empty
prog.c: In function ‘reverse’: prog.c:6:9: error: ‘head’ undeclared (first use in this function) prog.c:6:9: note: each undeclared identifier is reported only once for each function it appears in prog.c:7:9: error: ‘NULL’ undeclared (first use in this function) prog.c:13:14: error: dereferencing pointer to incomplete type prog.c:14:10: error: dereferencing pointer to incomplete type
Standard output is empty