#ifndef HAVE_GETOPT int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif_getopt_internal 比较长,就不贴了 标准如是说 /* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to [email protected] before changing it!
我有.
已经上传,下载链接如下:
http://adong2008.512j.com/temp/getopt.rar
int
getopt (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0);
}
#endif_getopt_internal 比较长,就不贴了
标准如是说
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to [email protected]
before changing it!
比如: -f file -rv welcome -gb gb2312rv gb好像不能正确认识吧?
如果可以,请告诉上面的参数,我在optstring中应该填充什么
有个option结构数组用来传长参数