Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


CDarwin

Member Since 04 May 2013
Offline Last Active May 08 2013 08:23 AM

Topics I've Started

problem binding a c++ function with luabind

04 May 2013 - 11:30 AM

Hello,
 
I'm pretty new to luabind. I'm having a little problem binding one of my string functions(convert to uppercase). Just couldn't figure it out.
 

void STools::UCase(char *txt)

{

for (;;)

{

u_int32 t = *reinterpret_cast(txt);

...

txt++;

}

}


Here's the luabind code
 

luabind::module(myLuaState) [

    luabind::def("convert_upper", STools::UCase)

  ]; 


Compiler Error
 

 

error C2664: 'void (char *)' : cannot convert parameter 1 from 'const char *' to 'char *'

 

Any help is appreciated!


PARTNERS