Sto provando a fare qualcosa del genere:
considerando che string è così definito:codice:string strelem; int const n = (sp[pos].identifier/10+1) + strlen(sp[pos].str)+4; strelem= (string)malloc(n+1 * sizeof(char)); sprintf(strelem,"<%d,%s>",sp[pos].identifier,sp[pos].str);
Però mi da il seguente errore: "cast specifies array type" sulla riga che valorizza strelem.codice:typedef char string[COST_NUM_CHAR];