I keep running into an "Access violation writing location" whenever I try to read an expression such as 3 + 5
#include <stdio.h>
add(double a, double b, int prec);
int main() {
int prec;
double a, b;
char oper;
printf("Enter Precision: ");
scanf_s("%d", &prec);
if (prec<0) {
printf("This is not a valid precision value");
}
printf("%d", prec);
printf("Enter Expression: ");
scanf_s("%lf %c %lf", &a, &oper, &b);
…
}