Hi, i am trying to convert a long integer to a string in hex format, here is what i have at the moment:
Code:
Parameters *executeInstruction(Parameters *params, char memory[8192][9], long opr, long opc, char *line, int trace){
char *s;
//.....blah blah blah other boring irrelevant code here.....
s = ltoa(params->a, s, 16); //SEG FAULTS HERE
}
Parameters is a struct i made, 'a' is a field in that struct of type long. Is there anything blindingly obvious i have missed here or is this going to be an annoying one?
thanks!