This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我有一个从存储在变量 i 中的 fgetc(file) 获得的字符。我想将 i 中包含的字符与常量 ie 进行比较(i == "\n"),但当然 i 是整数类型。我试过((char)i == "\n")了,但它不起作用。在这两种情况下,我都会收到“警告:指针和整数之间的比较”,但我不确定如何将其从指针更改为实际值。我应该在这里做什么?