Compilation error from "Serial Input Basics" tutorial code

I tried using the code from example 2 and I'm getting a compilation error from the line below.

if (rc != endMarker) {...}

The error reads:

ISO C++ forbids comparison between pointer and integer [-fpermissive]


No problems here.

Archiving built core (caching) in: C:\Users\Sterretje\AppData\Local\Temp\arduino_cache_212799\core\core_arduino_avr_nano_cpu_atmega328old_4e759d11e131d256fe058d84342dcde1.a
Sketch uses 1616 bytes (5%) of program storage space. Maximum is 30720 bytes.
Global variables use 240 bytes (11%) of dynamic memory, leaving 1808 bytes for local variables. Maximum is 2048 bytes.
    char endMarker = '>';
    char rc;

maybe there is a typo in you sketch.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.