By the way, I use it in main() like this:
uchar *test = "Test";
int size = sizeof(test);
uchar *outp = calloc(size, sizeof(uchar));
if(outp!=NULL){
readAndConvert(&test, &outp, 4, 0);
printf("%s\n", outp);
// free(outp);
}
and can't free memory by doing free(outp)...
I want to convert from one string to another and return it as a pointer *out_s? or as a string "res" will be ok as well. But my code doesn't work...
For example, copying res[n] = (char *)&out; doesn't work.
What is wrong with my code?(I am new to C, so please bear with me)
int...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.