Virtual Functions (C++ Concepts)

Virtual Functions
Design Patterns
Important C/C++ Basic Concepts
Program startup and termination are facilitated by using two functions: main and exit. Other startup and termination code may be executed.

The arguments in the prototype
int main( int argc[ , char *argv[ ] [, char *envp[ ] ] ] );
or
int wmain( int argc[ , wchar_t *argv[ ] [, wchar_t *envp[ ] ] ] );
allow convenient command-line parsing of arguments and, optionally, access to environment variables. The argument definitions are as follows:

argc
An integer that contains the count of arguments that follow in argv. The argc parameter is always greater than or equal to 1.
argv
An array of null-terminated strings representing command-line arguments entered by the user of the program. By convention, argv[0] is the command with which the program is invoked, argv[1] is the first command-line argument, and so on, until argv[argc], which is always NULL. See Customizing Command Line Processing for information on suppressing command-line processing.

The first command-line argument is always argv[1] and the last one is argv[argc

Leave a Reply

Your email address will not be published. Required fields are marked *