warning: comparison between pointer and integer in C

前端 未结 5 1292
栀梦
栀梦 2021-01-23 16:39

I get a warning

warning: comparison between pointer and integer

on the line containing if from the next piece of code:

         


        
5条回答
  •  旧巷少年郎
    2021-01-23 16:55

    have you included the .h necessary so that the compiler understands what getcwd returns?

    the behavior of your c compilers is probably to assume an int return value from every undefined function.

提交回复
热议问题