snprintf() is overkill when all you want to do is copy one string to another

Code:

strncpy((char*)test,arg,sizeof(test));

or use std::string class and you don't have to worry about buffer overflow

THX

Could it be that in c or in old versions of c++ you don't have to care about convert a unsigned char to char *?

My problem is that I have a blowfish .c file and a function int encrypt_string(char *key, char *str, char *dest, int len)
but I have to give this function unsigned chars, because otherwise ascii codes above 127 get encrypt false. But my compiler strikes to give unsigned chars to this function.