Omnet access method of another submodule error - no matching function for call to ‘check_and_cast(cModule*&)’
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Error: no matching function for call to ‘check_and_cast(cModule*&)’ I am trying to use the current position from another module "mobility" with n class type MassMobility. cModule * parentmod = getParentModule (); cModule * mobilitymod = parentmod -> getParentModule ()-> getSubmodule ( "mobility" ); EV << "Current module is " << mobilitymod -> getFullName () << endl ; MassMobility * mobility = check_and_cast < MassMobility *>( mobilitymod ); mobility -> getCurrentPosition (); I am getting compile time error :- no matching function