c++ - Void Parameter Type Causes Missing Type Error -
c++ - Void Parameter Type Causes Missing Type Error -
here prototype:
void recvproxy_togglesights( const crecvproxydata* pdata, void* pstruct, void* pout );
and function itself:
void recvproxy_togglesights( const crecvproxydata* pdata, void* pstruct, void* pout ){ cbasecombatweapon *pweapon = (cbasecombatweapon*)pstruct; if( pdata->m_value.m_int ) pweapon->enableironsights(); else pweapon->disableironsights();}
and error message code, both prototype , definition, generates:
error 19 error c4430: missing type specifier - int assumed. note: c++ not back upwards default-int f:\mods\ci testbed\src\game\shared\basecombatweapon_shared.cpp 47
how can resolve error?
is type 'crecvproxydata' defined? code otherwise right (assuming user defined types defined properly), although suggest place opening , closing braces function definition on own lines.
also, take issue void*: it's bit of hangover c, should aim eliminate source code necessary. utilize polymorphism or templates instead?
it's missing #include, or have made error in include guards. if post contents of filer 'crecvproxydata' defined code surrounding have posted, great help. otherwise, can speculate :).
c++ sdk void
Comments
Post a Comment