Hi,
I have written this code to multiply 2 floating point numbers and then saving it into a parameter:
Action()
{
double i;
double q;
double result,output;
double finalOutput;
int decimals=0;
i=atof(lr_eval_string("{UnitPrice}"));
q=atof(lr_eval_string("{Quantity}"));
result=i*q;
sprintf(result,"%2f",decimals);
sprintf(finalOutput,"Value=%2f",result);
//lr_get_attrib_double(result);
lr_output_message("%s",lr_eval_string("{OutPut}"));
return 0;
}
I'm getting this error message: Action.c(14): Error: C interpreter run time error: Action.c (14): Error -- memory violation : Exception ACCESS_VIOLATION received.
Line 14: sprintf(result,"%2f",decimals);
Any inputs/suggestions are highly welcome.
Thanks in advance,
sroy1