Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!ncar!noao!asuvax!enuxha!hocker From: hocker@enuxha.eas.asu.edu (Charles C. Hocker) Newsgroups: comp.lang.c Subject: Turbo C atexit function. Keywords: Turbo C Message-ID: <166@enuxha.eas.asu.edu> Date: 15 Jun 89 21:50:24 GMT Organization: Arizona State Univ, Tempe Lines: 35 Hello, I am using Turbo C 2.0 and am having trouble getting the atexit function to work. I typed in the following program from the Turbo C reference guide and could not get it to work. Does anyone know of any bugs using this function? #include #include atexit_t exit_fn1 (void) { printf("Exit function 1 called\n"); } atexit_t exit_fn2 (void) { printf("Exit function 2 called\n"); } main () { /* posting exit_fn1 */ atexit (exit_fn1); /* posting exit_fn2 */ atexit (exit_fn2); printf ("Main quitting...\n"); } When the program is compiled the following error messages are given: Type mismatch in parameter 'func' in call to 'atexit' in function main Any assistance will be appreciated. -Chuck hocker@eas.asu.edu