Why my way is doesnt work? "message" refers to Null
first function :
void messageToBit(FILE *m,char *message )
{
int fileSize = 0;
int k = 0;
char symb;
fseek(m, 0, SEEK_END);
fileSize = ftell(m);
fseek(m, 0, SEEK_SET);
message = (char*)malloc(8 * fileSize);
/* some action with message */
}
and call
void gg()
{
char* message = 0;
messageToBit(m, message);
....
}
why not pointing to the correct memory location?