It did not work. Break works, so there is not a problem but I'm curious. I looked up the word Exit in C++ web references and it is there and there are no errors from compiler either.
http://www.cplusplus.com that's where I looked it. But I guess I miss understood it. 'Process/function/loop all the same.' But what does exit do in Arduino or GCC, what assembly code it creates. I wonder why does GCC not know that embedded cpu has no OS to exit. (And give an error.)
exit() is a unix system call (i.e. a call to the unix kernel, as opposed to a simple library call) that terminates the process that calls it.
The arduino doesn't run unix, or any other oeprating system, so it doesn't know about exit() any more than it knows about fork() , exec(), ioctl(), etc...