问题与 nearstPoint qwt 的语法
Probléme with syntax of closestPoint qwt
感谢您帮助我使用closestPoint
qwt
的方法恢复 y 对应于值 x 的值。我把它,但仍然是语法问题?
error: invalid type '<unresolved overloaded function types> [int]' for array subscript
法典:
Curve-> closestPoint (pos [0], NULL);
您收到此错误是因为您调用了某个方法,但您使用[]
而不是()
因此您应该使用:
Curve->closestPoint(pos(), NULL);
正如医生所说closestPoint
需要QPoint
int QwtPlotCurve::closestPoint (const QPoint & pos, double * dist = NULL ) const
例如:
Curve->closestPoint(QPoint(1,1),NULL);
相关文章:
- 1d 智能指针不适用于语法 (*)++
- 助记符和指向成员语法的指针
- 有人能分解一下这个c++模板的语法吗
- C++避免重复声明的语法是什么
- QMetaObject invokeMethod的基于函数指针的语法
- 这个语法std::class<>{}(arg1, arg2) 在C++中是什么意思?
- 为什么包含windows.h会产生语法错误,从而阻止类的实例化?(C2146,C2065)
- 单独定义模板化嵌套类方法的正确语法
- 共享指针和具有自定义删除程序的唯一指针之间的语法差异背后的任何原因
- 错误 C2760:语法错误:映射迭代器上意外的标记"标识符",预期的";"
- 为什么我会收到错误 C2143 语法错误:缺少"*"之前的';'?
- 奇怪的代码抛出编译错误模板< J,int aSize=10> C2143:语法错误:在"<"之前缺少";"
- 使用基类指针调用基类的值构造函数的语法是什么?
- 很好的语法来获取对向量/数组数据的大小引用?
- C++语法运算符功能?
- C++使用 rand 定义函数语法
- 什么文件可以修改 atom 的C++语法?
- 创建模板嵌套类实例的语法?
- C++语法差异:二维和一维数组(指针算术)
- 问题与 nearstPoint qwt 的语法