c++ - how to parse several arguments using command line arguments -


i writing command line utility in want parse several arguments: right not reading data address(so please don't confuse -addr); primary objective design framework can parse several arguments follows.

filename read -addr value -addr2 value2 -addrn valuen -length value -range value -length2 value2 -lengthn valuen -width value -width2 value2 -widthn valuen 

the n can have maximum value of 64 , minimum value of 1.

please give valuable suggestions can it. thanks

consider using getopt library or of modifications, can make yout life easier.

http://www.boost.org/doc/libs/1_41_0/doc/html/program_options.html


Comments