小编siv*_*iha的帖子

这个函数 "a::b::ptr function(value)" 在 C++ 中如何调用?

我实际上是 C++ 的新手,我试图弄清楚编译器如何执行以下行:

pcl::ModelCoefficients::Ptr coefficients (new pcl::ModelCoefficients ());
Run Code Online (Sandbox Code Playgroud)

我知道pcl::ModelCoefficents()创建了一个类型的堆内存并将其指针传递给 function coefficients()。让我感到困惑的是,我们不应该使用如下所示的箭头运算符:

pcl::ModelCoefficients::Ptr->coefficients (new pcl::ModelCoefficients ());
Run Code Online (Sandbox Code Playgroud)

c++ pointers scope function

1
推荐指数
1
解决办法
46
查看次数

标签 统计

c++ ×1

function ×1

pointers ×1

scope ×1