SegFault after scanf?

后端 未结 4 557
南笙
南笙 2020-11-28 17:04
#include 
#define TimeConverter 60
#define TempFormula time * time * 4 / time + 2 - 20

double HoursMinToTime(int hour, int min);

double Temperature(         


        
4条回答
  •  囚心锁ツ
    2020-11-28 17:14

    You need to pass the address of these variables. Make sure to pay special attention to function signatures because you can end up with very strange results. Also, turn all warnings on for your compiler.

    scanf("%d %d", &hour, &min); 
    

提交回复
热议问题