argp 和 getopt 有什么区别? [英] What's the difference between argp and getopt?

查看:18
本文介绍了argp 和 getopt 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为标题是不言自明的.我正在制作一个程序,我想知道我应该使用这两者的什么以及为什么.

I think the title is self explanatory. I am making a program and I was wondering what I should use of the two and why.

推荐答案

argp 可能更灵活/更强大/等等,但 getopt 是 POSIX 标准的一部分.这是您必须根据您的程序是否具有可移植性而做出的选择.

argp may be more flexible / powerful / etc, but getopt is part of the POSIX standard. Thats a choice you've to make based on whether you expect your program to be portable.

这篇关于argp 和 getopt 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆