64,648
社区成员
发帖
与我相关
我的任务
分享
#include <climits>
#if CHAR_MIN == SCHAR_MIN
inline bool helper(char c, unsigned char & uc)
{
if(c >= 0)
{
uc = (unsigned char)c;
return true
}
return false;
}
#else
inline bool helper(char c, unsigned char & uc)
{
uc = c;
return true;
}
#endif
strcpy(target, str.c_str());