C++_main函数的argc和argv

catalog
argc,argv

argc,argv
int main( int _count, const char * _info[]){
cout << _count << endl; for( int i = 0; i < _count; ++i){ cout << _info[ i] << endl; } return 0; } 当我们得到main.exe后 一般我们会直接main.exe, 他的argc是1个, argv = {"main.exe"}也可以加一些参数 main.exe abc 123, 此时, argc是3, argv = {"main.exe", "abc", "123"} 即, 你的命令行写的是什么, 那么argv里 就是什么!!!

C++_main函数的argc和argv最先出现在Python成神之路

版权声明:
作者:Alex
链接:https://www.techfm.club/p/25677.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>