what does the signed/unsigned comparison warning mean?

前端 未结 5 487
南旧
南旧 2021-01-29 06:42
auto.cpp: In function ‘int autooo(unsigned int)’:
auto.cpp:33:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

5条回答
  •  花落未央
    2021-01-29 07:01

    It says you are comparing two different things. Most notably the range of one does not fit into the range of another.

    I.e there. Exists a number in the unsigned range that cannot be expressed as a signed number

提交回复
热议问题