0
Having two roles being the first :
void print_bytes (const void * end_byte, int n){
int k;
k = end_byte;
converte_binario(k);
}
Already the binary convert is a little big so I’ll explain, basically it converts an integer number to binary. I’m not able to compile the code, because I don’t know how to pass K as a parameter to the converte_binario function. I’ve tried to:
k = *end_byte;
k = (int)end_byte;
k = (int*)end_byte;
And all give error, I would like to know how to pass the K or even end_byte as parameter to the function converte_binario.
PS : Here is the "prototype" of the converte_binario function.
void converte_binario (int n);
You should use this: k = * ((int * ) end_byte);
– lsalamon