我试图用来scanf_s()
读取多个值,但每次运行程序时,我都会得到
实验室 2.exe 中 0x592AD6AC (msvcr120d.dll) 处的未处理异常:0xC0000005:访问冲突写入位置 0x00000000。
在弹出窗口中。我该如何解决?
float inTemp;
char inUnit;
char outUnit;
printf("Please enter the starting temperature with its units and the units\nyou would like to convert to (i.e. 74.5 F C): ");
scanf_s("%f %c %c", &inTemp, &inUnit, &outUnit); //takes in all user input (NOT WORKING)