Your scanf call has these problems:
1. Don't use commas, just use whitespace
2. The operands to scanf must be pointer type. Since you pass in float *'s, it means you leave off the * from the parameter.
Code:
scanf("%f %c %f", ptr_FirstNum, ptr_Oper, ptr_SecNum);
Also your Calculate function can't work like this:
Code:
*ptr_Result = *ptr_FirstNum *ptr_Oper *ptr_SecNum;
So you want the *ptr_Oper, which is a char like '+', '-', etc to be replaced as a mathematical expression. This must be done manually like this
Code:
if (*ptr_Oper == '+')
*ptr_Result = *ptr_FirstNum + *ptr_SecNum;
else if (*ptr_Oper == '-')
//...
else {
printf("Unknown operator!\n");
exit(123);
}
For the notation, start with simple examples and fully understand those ones on their own. For example, in scanf you usually do it like this:
Code:
int x;
scanf("%d", &x);
So now try it with a pointer parameter x like in your Calculate function.
Code:
int *x = malloc(sizeof(*x));
scanf("%d", x);
// ...
free(x);
Since &*x is the same as x, we just write x.