C 使用void方法有小问题

C 使用void方法有小问题,c,C,由于函数返回的是双精度,因此需要相应地更改其返回类型: $ gcc -o temperature temperature.c temperature.c: In function 'temperature': temperature.c:6: warning: 'return' with a value, in function returning void temperature.c: In function 'main': temperature.c:15: error: void valu

由于函数返回的是双精度,因此需要相应地更改其返回类型:

$ gcc -o temperature temperature.c
temperature.c: In function 'temperature':
temperature.c:6: warning: 'return' with a value, in function returning void
temperature.c: In function 'main':
temperature.c:15: error: void value not ignored as it ought to be

您好,谢谢您的帮助,我想这是主要问题,但是我现在遇到了这个问题C:\cygwin\tmp\ccGL52Uy.o:temperature.C:(.text+0x5a):未定义对'atolf'集合的引用2:ld返回了1个退出状态此代码中的问题是'double C=atolf(argv[1]);'我正在尝试将argv[1]字符解析为双精度字符value@DeepakTivari:
$ gcc -o temperature temperature.c
temperature.c: In function 'temperature':
temperature.c:6: warning: 'return' with a value, in function returning void
temperature.c: In function 'main':
temperature.c:15: error: void value not ignored as it ought to be
double temperature(double x) {
^^^^^^