当前位置: 代码迷 >> 综合 >> 随手记_C++语法中的一些注意事项
  详细解决方案

随手记_C++语法中的一些注意事项

热度:82   发布时间:2024-02-28 04:44:31.0

1.  默认实参必须在形参列表结尾

//正确:
cv::Mat TrackRGBD(const cv::Mat &im, const cv::Mat &depthmap, const double &timestamp, string filename="", const PointCloud::Ptr &cloud = NULL);//错误:
cv::Mat TrackRGBD(const cv::Mat &im, const cv::Mat &depthmap, const double &timestamp, string filename="",PointCloud::Ptr &cloud);

2.