Finding null in an array of chars

i am trying to make a while loop that goes through an array of characters and looks for the end of line character or null or /0 but it wont let me how do i set this up?
while(array[i] != "NULL")
ISO C++ forbids comparison between pointer and integer

this is my error
i also tried while(array[i] != "\0") it gives the same error
Last edited on
Use single quotes around '\0' (note that it is a backslash).
wow i tried the single quotes and it didn't work and then when i changed it back i put the right \ instead of / and had "\0" and wasn't working haha well ty
What zhuge said. Single quotes for characters, double quotes for zero terminated strings.
Topic archived. No new replies allowed.