RAD Studio |  |

About The main() Function
See Also
Collapse All

Every C and C++ program must have a program-startup function.

- Console-based programs call the main function at startup.
- Windows GUI programs call the WinMain function at startup.

Where you place the startup function is a matter of preference. Some programmers place main at the beginning of the file, others at the end. Regardless of its location, the following points about main always apply.

- Arguments to main
- Wildcard arguments
- Using -p (Pascal Calling Conventions)
- The value that main() returns

See Also

Arguments To Main

Wildcard Arguments

Using -p (Pascal Calling Conventions)

The Value that main() Returns

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!