-
13
pages
-
English
-
Documents
Description
MODULE Y THE main() AND COMMAND-LINE ARGUMENT My Training Period: hours Note: Compiled using Microsoft Visual C++ / .Net, empty win32 console mode application. Some examples also tested using Borland C++ Builder 5.02. gcc compilation example is given at the end of this Module. For the main() command line arguments and pointer story, please read Module 8, Section 8.9. For wide character and Unicode wmain() please refer to Module G (Story) and Module M (implementation). Abilities: ▪ Able to understand and use a portable main() versions and their variation. ▪ Able to understand and use programs that accept command-line arguments. ▪ Able to build programs that accept command-line arguments. ▪ Able to build programs that can run with options/switches. Y.1 The main Function and Program Execution - The ‘concepts’ discussed in this Module may be very useful for UNIX / Linux (or command line tools for Microsoft Windows) programmers because of the extensive usage of the command-line programs or tools. - A special function called main() is the starting point of execution for all C and C++ programs. It is not predefined by the compiler; so that, it must be supplied in the program. - If your code adheres to the Unicode programming model, then you can use the wide-character version of main(), wmain(), but it is implementation dependent. - The function serves as the starting point for program ...
-
Publié par
-
Langue
English