F
Frank Liebelt
Hi
I try to convert a int array into a char array. My code: void exec()
{
char mds[32];
int i;
int mdc[32] =
{50,100,97,51,101,50,99,51,48,55,100,102,55,53,101,56,100,48,101,53,101,52,99,98,102,55,101,50,53,100,49,53};
for(i=0; i < 32; i++) {
sprintf(mds, "%s", (char*)mdc);
}
printf("Result : %s\n", md5s);
}
If i compile this i got one compiler warning:
warning: passing arg 1 of `sprintf' makes pointer from integer without
a cast
Cause this was the only warning i tried to run the program but get allways
a Segmentation Fault.
I dont know what to do. Uncle Goolge doesn't help me. Sorry, maybe i use
the wrong search terms.
Who could tell me whats going wrong?
Frank
I try to convert a int array into a char array. My code: void exec()
{
char mds[32];
int i;
int mdc[32] =
{50,100,97,51,101,50,99,51,48,55,100,102,55,53,101,56,100,48,101,53,101,52,99,98,102,55,101,50,53,100,49,53};
for(i=0; i < 32; i++) {
sprintf(mds, "%s", (char*)mdc);
}
printf("Result : %s\n", md5s);
}
If i compile this i got one compiler warning:
warning: passing arg 1 of `sprintf' makes pointer from integer without
a cast
Cause this was the only warning i tried to run the program but get allways
a Segmentation Fault.
I dont know what to do. Uncle Goolge doesn't help me. Sorry, maybe i use
the wrong search terms.
Who could tell me whats going wrong?
Frank