Warning: comparison between pointer and integer??

< H2 > Code < / H2 >

tag: my_fgets.c

[root@server0 fgets]-sharp gcc -c my_getline.c
my_getline.c: In function  "my_getline" :
my_getline.c:7:36: warning: comparison between pointer and integer [enabled by default]
     if ( (my_fgets(line, max, fp)) == NULL)
                                    ^

Why is there such an error?

C
Jul.01,2021

the code you posted is not the same as the code that reported the error, okay?


I asked the question on stackoverflow and got the answer:
https://stackoverflow.com/que.

clipboard.png

Menu