Path: utzoo!attcan!uunet!peregrine!ccicpg!cci632!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!rochester!rutgers!tut.cis.ohio-state.edu!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Turbo C atexit function. Keywords: Turbo C atexit Message-ID: <10414@smoke.BRL.MIL> Date: 22 Jul 89 00:13:10 GMT References: <166@enuxha.eas.asu.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <166@enuxha.eas.asu.edu> hocker@enuxha.eas.asu.edu (Charles C. Hocker) writes: >atexit_t exit_fn1 (void) >{ > [...] >main () >{ > /* posting exit_fn1 */ > atexit (exit_fn1); > [...] > Type mismatch in parameter 'func' in call to 'atexit' in function main I don't know what atexit_t is supposed to be (it's not part of the C Standard), but I suspect your problem lies in using it for the function return type. Functions registered via atexit() have void return type. Try changing atexit_t to void in your test program. Also note that you're supposed to return an explicit value for the result of main(); 0 would be a good one.