I have few experience developing C applications and I am having a specific cast problem. I have a char variable hard coded that I need to pass as a parameter in a function.
char * data = "058dd54970d65c";
This is the function:
PJ_DECL(pj_status_t) pjsua_call_make_call(pjsua_acc_id acc_id,
const pj_str_t *dst_uri,
const pjsua_call_setting *opt,
void *user_data,
const pjsua_msg_data *msg_data,
pjsua_call_id *p_call_id);
In order to use it:
pjsua_call_make_call(acc_id, &uri, 0, NULL, data, NULL);
As you can see I need a cast in the parameter 5. I am getting this error:
note: expected const struct pjsua_msg_data * but argument is of type char *
I try to use sprintf and other solutions but do not work. I would be gratefull if somebody could help me.
Aucun commentaire:
Enregistrer un commentaire