摘要: (本文章仅适用于C++程序)写服务程序时,如果需要提供命令行参数。传统的方法是手工解析argv参数,或者使用getopt函数。两种方法都比较费劲。使用Google gflags可以大大简化命令行参数处理。安装gflag从官方地址http://code.google.com/p/google-gflags/下载gflags并安装。比如我下载的是1.5版本。[yichi@yichi tmp]$ wgethttp://google-gflags.googlecode.com/files/gflags-1.5.tar.gz[yichi@yichi tmp]$ tar zxvf gflags-1.5.t 阅读全文
posted @ 2012-02-15 11:34 dkcndk 阅读(18179) 评论(0) 推荐(1) 编辑