I want to create some private variables, but when i compile the program i get an error. If I move the variables above the class SimpleOpenNIViewer than it works.
This is the error Messages: /Workspace/virtual-reality/main.cpp:16:56: error: expected identifier before ‘new’ PointCloud::Ptr cloud_previous2 (new PointCloud);
This is how I have written the code. Can anyone tell me why this doesnt work?
class SimpleOpenNIViewer
{
private:
PointCloud<PointXYZRGBA>::Ptr cloud_previous2 (new PointCloud<PointXYZRGBA>);
PointCloud<PointXYZRGBA>::Ptr cloud_previous1 (new PointCloud<PointXYZRGBA>);
PointCloud<PointXYZHSV>::Ptr cloud_HSVPrev2(new PointCloud<PointXYZHSV>);
PointCloud<PointXYZHSV>::Ptr cloud_HSVPrev1(new PointCloud<PointXYZHSV>);
PointCloud<PointXYZHSV>::Ptr cloud_HSVCurr(new PointCloud<PointXYZHSV>);