I want to parse command line arguments.
Say someone gives me
./progname param2 [-price=50] [-size=10] [-weight=16] [-height=7]
Square bracketed items are optional.
Either none or exactly two of -price, -size, -weight, and -height can be specified. If none of them are specified, it should be taking default values for price & weight.
I have already found how to decode for argv, argv.
But for argv beyond till these optional items end, i am not able to parse.
I require code that can help me or some sort of syntax if complete code not possible. Thanks.