he cloud_test is a pointer to a PointCloud::Ptr type. So you have to access to its body using function get() and then access the points through it.
pcl::PointCloud<pcl::PointXYZ>::Ptr *cloud_test;
cloud_test= new pcl::PointCloud<pcl::PointXYZ>::Ptr (new pcl::PointCloud<pcl::PointXYZ>);
if (!cloud_test) cloud_test->get()->points.clear();
you can use this either. in the below, cloud_test is a PointCloud::Ptr type (not a reference pointer):
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_test ;
cloud_test = pcl::PointCloud<pcl::PointXYZ>::Ptr (new pcl::PointCloud<pcl::PointXYZ>);
cloud_test.get()->points.clear();
or you can use boost::shared_ptr as pointer to PointCloud::Ptr type as below:
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ>::Ptr> cloud_test;
cloud_test = boost::make_shared <pcl::PointCloud<pcl::PointXYZ>::Ptr> (new pcl::PointCloud<pcl::PointXYZ>);
cloud_test->get()->points.clear();
:)