You could use something like (untested, but should get you going):
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
#include <vector>
// Get Hokuyo data
int numberOfDataPoints = 0; // you need to fill this
std::vector<double> hokuyoDataX,hokuyoDataY;
for(int i=0;i<numberOfDataPoints;i++)
{
hokuyoDataX.push_back(...); // you need to fill this for the x of point i
hokuyoDataY.push_back(...); // you need to fill this for the y of point i
}
// Define new cloud object
pcl::PointCloud<pcl::PointXY>::Ptr cloud (new pcl::PointCloud<pcl::PointXY>);
cloud->is_dense = true; // no NaN and INF expected.
cloud->width = hokuyoDataX.size();
cloud->height = 1;
cloud->points.resize(hokuyoDataX.size());
// Now fill the pointcloud
for(int i=0; i<hokuyoDataX.size(); i++)
{
cloud->points[i].x = hokuyoDataX[i];
cloud->points[i].y = hokuyoDataY[i];
}