针对与slam 读取数据时的函数时argc[ ]
LoadImages(string(argv[3]), vstrImageFilenames, vTimestamps)
实例解释:
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int i;
for (i = 0; i<argc; i++)
std::cout<<i<< ":"<<argv[i]<<std::endl;
return 0;
}
输出:
lsw@vslam:~/桌面$ g++ test.cpp -o test
lsw@vslam:~/桌面$ ./test 1 2 3
0:./test
1:1
2:2
3:3