错误 C3646:“关闭” :未知的覆盖说明符
我收到以下错误:
error C3646: 'closure' : unknown override specifier
代码:
void BaseOperator::mousebutton_cb(EventObject* sender, EventArgs* calldata, void* closure)
{
xd3D::Operation::Operator::BaseOperator* operator = (xd3D::Operation::Operator::BaseOperator*)closure;
MouseButtonEventArgs* e = (MouseButtonEventArgs*)calldata;
if (e->Status == Down)
operator->OnMouseButtonDown(e);
else
operator->OnMouseButtonUp(e);
}
你知道为什么我会出现此错误吗?
I got the following error:
error C3646: 'closure' : unknown override specifier
The code:
void BaseOperator::mousebutton_cb(EventObject* sender, EventArgs* calldata, void* closure)
{
xd3D::Operation::Operator::BaseOperator* operator = (xd3D::Operation::Operator::BaseOperator*)closure;
MouseButtonEventArgs* e = (MouseButtonEventArgs*)calldata;
if (e->Status == Down)
operator->OnMouseButtonDown(e);
else
operator->OnMouseButtonUp(e);
}
Do you know why I have this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
operator
是一个关键字。序列operator =
尝试声明一个赋值运算符,在您的情况下该运算符将具有指针参数类型。并且您的编译器希望将最后一个闭包解析为特殊说明符,例如override(据我所知是MSVC的扩展),const等。将变量重命名为其他名称,例如
myoperator
。operator
is a keyword. The sequenceoperator =
tries to declare an assignment operator which in your case would have a pointer parameter type. And your compiler wants to parse the very lastclosure
as a special specifier likeoverride
(afaik an extension of MSVC),const
or such.Rename the variable to something else, like
myoperator
.