warning: return type defaults to ‘int’ [-Wreturn-type]

前端 未结 2 1345
鱼传尺愫
鱼传尺愫 2020-11-28 13:42

I\'m a Linux user who started learning C and I\'m trying to compile this source that I typed:

#include 
main()
{
        float c,d;
        c          


        
2条回答
  •  粉色の甜心
    2020-11-28 13:50

    main()
    

    should be

    int main()
    

    In C89, the default return type is assumed to be int, that's why it works.

提交回复
热议问题