Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAnoop Chauhan

Posted 05 January 2013 - 10:01 PM

effMacros[0].Definition = std::to_string(MAX_BONES_MATRICES).c_str();

the lifetime of return constant character string is owned by class string, which has limited scope in your code( no persistent variable
is available of class string) ,you'd better to use code explained by Nyssa

 

std::string boneMatixString = to_string(MAX_BONES_MATRICES)

effMacros[0].Definition = boneMatixString.c_str();


#1Anoop Chauhan

Posted 05 January 2013 - 10:00 PM

effMacros[0].Definition = std::to_string(MAX_BONES_MATRICES).c_str();

the lifetime of return constant character string is owned by class string, which has limited scope in your code( no persistent wariable
is available of class string) ,you'd better to use code explained by Nyssa

 

std::string boneMatixString = to_string(MAX_BONES_MATRICES)

effMacros[0].Definition = boneMatixString.c_str();


PARTNERS