方法一
#include <stdio.h>
for (num = 0;num<100;;)
{char namePoint[100];
//保存路径
sprintf(namePoint,"PointCloud/pcd_%d.ply",num);
//保存数据
savePly(std::string(namePoint), you file(你要保存的数据));
num ++;
}
方法二:
#include <sstream>
for (num = 0;num<100;;)
{
ostringsteam pcl_name;
//ostrsteam pcl_name;注意命名空间
using namespace std;
pcl_name<<num<<".pcd"
pcl::io::savePCDFile(pcl_name.str(), *cloud_cluster);
num ++;
}