Win32 API command line arguments parsing

前端 未结 9 2465
小蘑菇
小蘑菇 2020-12-16 13:52

I\'m writing Win32 console application, which can be started with optional arguments like this:

app.exe /argName1:\"argValue\" /argName2:\"argValue\"
         


        
9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-16 14:42

    There is no Win32 support for parsing command-line arguments.

    See related articles at MSDN:
    Parsing C++ Command-Line Arguments
    Argument Definitions
    Customizing C++ Command-Line Processing

    also look at similar questions:
    What parameter parser libraries are there for C++?
    Parsing parameters to main()
    Option Parsers for C/C++?
    What's an effective way to parse command line parameters in C++?
    ...

提交回复
热议问题