Hallo, was bedeutet: array subscribt has type `char'
hallo, bischen kurze beschreibung, aber vermutlich verwendest du als array-index ein 'char' statt wie "richtig" einen 'int'. hth, bye kosmo
Aus dem GCC-Manual: -Wchar-subscripts Warn if an array subscript has type "char". This is a common cause of error, as programmers often forget that this type is signed on some machines. This warning is enabled by -Wall. Der Punkt ist: wenn du ein "char" hast, das implizit wie "signed char" behandelt wird (das ist die Voreinstellung beim AVR-GCC), dann werden Werte >= 128 bei der impliziten Typumwandlung, die beim Zugriff auf ein Array vorgenommen wird, zu negativen Indizes. Das willst du nicht wirklich so haben, denke ich mir. ;-) Es ist aber völlig OK, ein uint8_t (aus <stdint.h>) als Index zu nehmen.
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.