在OpenCV中将Point数据类型转换为int
Converting from Point datatype to int in OpenCV
我正在编写一个程序,使用windows.h中定义的SetCursorPos()
移动鼠标指针。SetCursorPos
的参数应该是int
。我有一个从矩形中得到的Point
数据结构。如何转换?提前感谢:)
SetCursorPos定义为:
BOOL WINAPI SetCursorPos(
_In_ int X,
_In_ int Y
);
所以你可以使用:
Point p;
....some code
SetCursorPos(p.x,p.y);
相关文章:
- 将双精度值分配给 int 数组时的类型转换
- 使用模板在size_t和int之间进行隐式类型转换
- 复制初始化 - 从 'int' 类型转换为非标量类型
- 无法将 int 类型转换为时间类型(我的类类型)
- 避免将 Int 转换为双重类型转换舍入
- 类型转换<int>的舍入问题
- 类型转换指向 int 的 void 指针时出错
- 为什么C/C++会自动将char/wchar_t/short/bool/enum类型转换为int
- 如何将 void 指针类型转换为 int 指针,然后在其中存储 int
- C++简单的矢量程序中从 int 类型转换为非标量类型
- 将指针类型转换为int会崩溃
- 将无符号int类型转换为无符号长int C++
- 类型转换时这是什么意思 *(int*)&x?
- 将常量字符* 类型转换为 int 数组
- C++类型转换 int * 到类
- C/C++ 类型转换将 int** 转换为 const int**
- 预期的类型说明符,并且无法在初始化时转换“int*”
- c++需要将int类型转换为无符号int
- 从“char*”到“char”[-fpermissive]的转换无效,数组下标的类型“char[int]”无效
- 类型转换(int**)和int(*)的区别