|
From: Michael D. S. <for...@hi...> - 2003-09-15 15:27:20
|
> 2) Does a C code need the entitled "main" function to run alone? Please, > disconsider the WinMain case There is no need to disconsider the winmain case. C Always executes the=20 main function first. In this case, the main function is the Windows OS. Windows then calls a=20 WinMain function (your program and/or others) when it allocates time for=20 it. This is considered "better" because if your program=20 stalls/crashes/infinite loops Windows can, after an allocated time period=20 take back control. Also in a multi-threaded environment some programs could= =20 be CPU hogs. This forces them to behave. This also makes it possible for a Windows program to receive messages=20 (keypress/mouse event) at any time during execution. That would be=20 difficult if not impossible in a linearly executing program. In my experience this all sounds better than it actually works but...=20 that's the theory :) ms At 05:51 PM 9/14/03, you wrote: >Bibliographic references are for school work and are better located by >yourself. > >/Per W > >On Sun, 14 Sep 2003, Andr=E9 Mac=E1rio Barros wrote: > > > Dear Users, > > > > 1) Does exist any difference in speed with C codes that use > > > > function prototypes > > main function > > function definitions > > > > or > > > > function definitions > > main function > > > > 2) Does a C code need the entitled "main" function to run alone? Please, > > disconsider the WinMain case > > > > Fellows, if possible, together with the answers, please indicate > > bibliography > > or link that contains the answers. > > > > Regards > > Andre Barros > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |