关于主函数main()的参数传递问题!急!
现在在看一个程序,涉及到了主函数的参数传递问题,以前一直没有注意这个问题,问题如下:int main(int argc, char *argv[])或int main(int argc, char **argv)
在程序中用到了这两个参数,如if (argc<2) {...} Cparam.ReadParameterFile(argv[1])等,
我看了些资料,如:
argc:An integer that contains the count of arguments that follow in argv. The argc parameter is always greater than or equal to1.
argv: An array of null-terminated strings repressenting command-line arguments entered by the user of the program. By convention , argv[0] is the command with which the program is invoked , argv[1] is the first command-line argument, and so on, until argv[argc], which is always NULL..............
但是,具体的,到底这两个参数的低层传递过程是怎么完成的,传递的是什么数据
(有的资料上说是传递命令行相关参数,但是我看的程序里只有一个参数文件,根本没有用到命令行!!)
真诚希望高手门不吝赐教,小弟将不胜感激!!!