https://blog.csdn.net/LYJ_viviani/article/details/51873961
https://*.com/questions/3024197/what-does-int-argc-char-argv-mean
#include <iostream> int main(int argc, char** argv) {
std::cout << "Have " << argc << " arguments:" << std::endl;
for (int i = ; i < argc; ++i) {
std::cout << argv[i] << std::endl;
}
}
g++ main.cc 编译后
运行他将./test a1 b2 c3
输出