如何解决错误C2352 [英] how to resolve error C2352

查看:196
本文介绍了如何解决错误C2352的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友您好,我陷入了错误.我有一张STL地图

Hello friends, I stuck in an error. I have one stl map

std::map<EVideoStandard, TAPIMvFlexEngine> m_mapJEngines;


我以以下方式使用了此地图


and I used this map in following way

m_mapJEngines.insert(pair<EVideoStandard, TAPIMvFlexEngine>(UtilityHelper::MvResolutionInfoToVTVideoStandard(sResInfo), pJEngine));	


我收到一个错误,错误为


I got an error as

error C2352: 'UtilityHelper::MvResolutionInfoToVTVideoStandard' : illegal call of non-static member function


UtilityHelper是一个类,其成员函数为MvResolutionInfoToVTVideoStandard,并且我传递了sResInfo结构.我将成员函数定义为


UtilityHelper is a class which have a member function as MvResolutionInfoToVTVideoStandard and I pass a structure sResInfo. I defined the member function as

EVideoStandard UtilityHelper::MvResolutionInfoToVTVideoStandard(SMvResolutionInfo sResInfo




请帮助我解决此错误.



Please help me to resolved this error.

推荐答案

您正在调用UtilityHelper :: MvResolutionInfoToVTVideoStandard(sResInfo)
使用类型名称"UtilityHelper"而不是从UtilityHelper实例中调用函数.
这样只能调用静态函数(即无需实例).
You are calling UtilityHelper::MvResolutionInfoToVTVideoStandard(sResInfo)
Using the type name "UtilityHelper" rather than calling the function from an instance of UtilityHelper.
Only static functions can be called in this way (i.e. no instance required).


这篇关于如何解决错误C2352的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆