VS 2015main函数带参数的调试

最近学习pcl,学习C++,今天让main的参数接收数据,想起没用过这样的,不知道怎么在vs里面调试ios

所以找了下方法,并记录下来学习

代码spa

#include<iostream>

int main(int argc, char** argv) {
    std::cout << "参数数量为:"<<argc<<std::endl;
    for (int i = 0; i < argc; i++) {
        std::cout << argv[i] << std::endl;
    }
    system("pause");
    return 0;
}

 右键项目—》属性—》调试—》命令参数调试

运行结果code

相关文章
相关标签/搜索