问答详情
源自:5-14 综合练习

求助,哪里有问题

In function 'price':
warning: 'return' with a value, in function returning void
In function 'main':
error: void value not ignored as it ought to be
error: void value not ignored as it ought to be
warning: no newline at end of file


怎解?

提问者:Fuko 2015-03-16 15:31

个回答

  • 康振宁
    2015-03-16 15:34:40
    已采纳

    price这个方法的返回值类型不对,换成float