pointer dargreenspun.com : LUSENET : Ask William : One Thread |
extern FILE *dar; // global file pointer void dar(void) { // modify dar with fopen(), etc. } void otherdar(void) { // read dar here } otherdar(void) should be able to access *dar, right?
-- Max Harris (adm@sal.mhasd.k12.wi.us), December 01, 1998
Yes, *dar is defined outside the scope of both dar and otherdar; it is global to both of them.You will run into problems with the FILE dar and the function dar, however.
-- William (spqrspqr@hotmail.com), December 01, 1998.