1234567891011121314151617181920212223242526
#include <iostream> #include <string> using namespace std; void function (unsigned char* digits) { unsigned char* inTake = NULL; //strcpy((char*)inTake,(const char*)digits); - How to do it? //Segmentation fault } int main() { unsigned char digits [20]= "7709916089"; unsigned char number[20]; memcpy((void*)number,(void*)digits,sizeof(number)); function(number); return 0; }