gamehack wrote:
Hi all,
I was wondering what's the way to create your own main loop? Say I want
to index file and the indexing should be happening in the main loop and
when there are no files to index, the process will just run as a
daemon. I know this is possible with a simple while(1) but what a about
a true main loop?
What's not "true main" about
:
int main(int argc,char *argv[])
{
while (1)
{
... everything here ...
}
return(0);
}
If you don't like that for some reason:
int main(int argc,char *argv[])
{
while (1)
{
main2(argc,argv);
}
return(0);
}
int main2(int argc,char *argv[])
{
... put everything that was "main()" here ...
}
What, exactly, are you trying to do?
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody |
www.hvcomputer.com | |
| kenbrody/at\spamcop.net |
www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>