- Contents of this lesson:
- > The C++
main function signature
- > Process arguments versus the standard
- > The command line
- > The process’s current directories
- > The process environment
This lesson’s main points:
- The standard
main arguments are ungood for serious Windows programming.
- Each Windows process has multiple current directories, one per drive, just like in DOS.
- Much Windows programming support code is roughly the same in many programs (think reuse).
One reaction to this posting was that it must surely be irrelevant to Windows GUI programming. Command line,
main arguments? Hey?
Well that’s where it all starts, e.g. when you double-click a file to just “open” it: the program then receives the file name via a command line, which in standard C++ ends up as individual arguments to
And one interesting fact is that the C++ standard
main signature is utterly useless for reliably transferring such file names in Windows.