( ISO C++ forbids comparison between pointer and integer ) problem


hello everyone!
i have part of code, when verify it, gives me eeror

arduino: 1.8.3 (windows 8.1), board: "arduino due (programming port)"
 error: iso c++ forbids comparison between pointer , integer [-fpermissive]

       if(serial.available() == "enrfun"){ //enter room

                                ^

box1:142: error: iso c++ forbids comparison between pointer , integer [-fpermissive]

       else if(serial.available() == "guestfun"){ //enter room

                                     ^

exit status 1
iso c++ forbids comparison between pointer , integer [-fpermissive]



and there part of code:
code: [select]
if(serial.available()){
      if(serial.available() == "enrfun"){ //enter room
        lcd.print("enter or not");
        enterroomfunction();
      }
      else if(serial.available() == "guestfun"){ //enter room
        lcd.println("guest");
        lcd.println("go out now");
      }




i have tried find solutions didn't find any>
thank <3

what available() return?


Arduino Forum > Using Arduino > Programming Questions > ( ISO C++ forbids comparison between pointer and integer ) problem


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts