PDA

View Full Version : system("pause"); in xcode (C programming)




darxun
May 14, 2008, 07:56 AM
Hi there,

I realised that "system("pause");" doesn't work in xCode (im programming C). Is there anything which does exactly the same?

th



yeroen
May 14, 2008, 08:06 AM
There is no 'pause' shell command. There is a pause() C-function declared in unistd.h, but it's use is deprecated.

You'll have to work with signal masks and the sigsuspend() function. If you need to read up on signal handling in C, you can read up on it here:

http://www.gnu.org/software/libc/manual/html_node/index.html#toc_Signal-Handling