Parsing command-line arguments in C?

后端 未结 12 807
眼角桃花
眼角桃花 2020-11-22 16:23

I\'m trying to write a program that can compare two files line by line, word by word, or character by character in C. It has to be able to read in command line options

12条回答
  •  旧巷少年郎
    2020-11-22 16:45

    I wrote a tiny library that parses arguments similar to POpt, which I had several issues with, called XOpt. Uses GNU-style argument parsing and has a very similar interface to POpt.

    I use it from time to time with great success, and it works pretty much anywhere.

提交回复
热议问题