C warning implicit declaration of function 'exit'

ambika picture ambika · Mar 9, 2010 · Viewed 87.3k times · Source

This is my warning.

implicit declaration of function 'exit'

How i can remove it.

i am using linux & gcc compiler.

Answer

Greg Hewgill picture Greg Hewgill · Mar 9, 2010

Add:

#include <stdlib.h>

to the top of your program.