What happens to '0'???
Solved/Closed
Related:
- Whatsapp-desktop-2-2401-5-0.msixbundle
- Download WhatsApp: PC / Mac / Android (APK) - Download - Instant messaging
- Gta 5 download apk pc - Download - Action and adventure
- Tentacle locker 2 - Download - Adult games
- Desktop goose - Download - Other
- Forza horizon 5 download free - Download - Racing
6 responses
crazy_devil
Posts
122
Registration date
Wednesday February 20, 2008
Status
Member
Last seen
February 6, 2009
18
Apr 3, 2008 at 03:18 PM
Apr 3, 2008 at 03:18 PM
lol Thats like chinese to me ^^
Soory cant help this hehee
Take care darani ;0P
Soory cant help this hehee
Take care darani ;0P
kilian
Posts
8732
Registration date
Thursday September 18, 2003
Status
Anonymous
Last seen
February 5, 2025
1
Apr 3, 2008 at 07:27 PM
Apr 3, 2008 at 07:27 PM
Hi!
Under Unix/Linux it is returned to the parent process ;-)
The return of the main is the "exit code".
It is sometimes important to determine if a child executed itself as it wanted to.
As an example, consider a shell under Linux. When an application is launched by the shell, the shell becomes the parent process, and the application launched is the child.
In this configuration, the shell will wait for the end of its child. If it terminated correctly , it will return a value (the return of the main or the value of exit if the exit function was used). And the parent (the shell) will be able able to read the exit status.
Under Unix/Linux it is returned to the parent process ;-)
The return of the main is the "exit code".
It is sometimes important to determine if a child executed itself as it wanted to.
As an example, consider a shell under Linux. When an application is launched by the shell, the shell becomes the parent process, and the application launched is the child.
In this configuration, the shell will wait for the end of its child. If it terminated correctly , it will return a value (the return of the main or the value of exit if the exit function was used). And the parent (the shell) will be able able to read the exit status.
thnx frnd...
the answer was very useful...
if it is in other platform then????
say like windows, etc....
the answer was very useful...
if it is in other platform then????
say like windows, etc....
kilian
Posts
8732
Registration date
Thursday September 18, 2003
Status
Anonymous
Last seen
February 5, 2025
1
Apr 10, 2008 at 12:52 PM
Apr 10, 2008 at 12:52 PM
Under Windows it is a bit different. the standard entrypoint of a windows based program is the WinMain function. As you can see, its parameters are a bit different and it's the same for its return value.
You can use the main() under windows but I guess that the compiler build itself a WinMain function that calls your main() function.
And what happens to the WinMain return value?
For example when you kill yourself a process with TerminateProcess you can examine its return code with GetExitCodeProcess to know how it terminated :-)
You can use the main() under windows but I guess that the compiler build itself a WinMain function that calls your main() function.
And what happens to the WinMain return value?
For example when you kill yourself a process with TerminateProcess you can examine its return code with GetExitCodeProcess to know how it terminated :-)
kilian
Posts
8732
Registration date
Thursday September 18, 2003
Status
Anonymous
Last seen
February 5, 2025
1
Apr 10, 2008 at 12:55 PM
Apr 10, 2008 at 12:55 PM
And under Mac Os X it is the same as in Linux, because they are both Unix-like systems.