string comparison
arduino: 1.6.5 (windows 7), board: "arduino uno"
serialevent.ino: in function 'void loop()':
serialevent:37: error: invalid conversion 'char' 'const char*' [-fpermissive]
in file included c:\program files\arduino\hardware\arduino\avr\cores\arduino/arduino.h:25:0,
from serialevent.ino:20:
c:\program files\arduino\hardware\tools\avr\avr\include\string.h:125:12: error: initializing argument 1 of 'int strcmp(const char*, const char*)' [-fpermissive]
extern int strcmp(const char *, const char *) __attr_pure__;
^
invalid conversion 'char' 'const char*' [-fpermissive]
report have more information with
"show verbose output during compilation"
enabled in file > preferences.
serialevent.ino: in function 'void loop()':
serialevent:37: error: invalid conversion 'char' 'const char*' [-fpermissive]
in file included c:\program files\arduino\hardware\arduino\avr\cores\arduino/arduino.h:25:0,
from serialevent.ino:20:
c:\program files\arduino\hardware\tools\avr\avr\include\string.h:125:12: error: initializing argument 1 of 'int strcmp(const char*, const char*)' [-fpermissive]
extern int strcmp(const char *, const char *) __attr_pure__;
^
invalid conversion 'char' 'const char*' [-fpermissive]
report have more information with
"show verbose output during compilation"
enabled in file > preferences.
serialevent:37: error: invalid conversion 'char' 'const char*
your 'rack'-variable char (one character). scrcmp() method can compare 2 instances of char* (pointer null-terminated-character-array).
furthermore, never assign value 'rack' variable.
your 'rack'-variable char (one character). scrcmp() method can compare 2 instances of char* (pointer null-terminated-character-array).
furthermore, never assign value 'rack' variable.
Arduino Forum > Using Arduino > Programming Questions > string comparison
arduino
Comments
Post a Comment