You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is Issue 304 moved from a Google Code project.
Added by 2010-07-27T20:26:20.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Invalid).
Original labels: Type-Defect, Priority-Medium, Component-Core
Original description
What steps will reproduce the problem?
This code:
void loop() {
String stringOne = "this";
for (int charNum = 0; charNum < stringOne.length(); charNum++) {
char thisChar = stringOne.charAt(charNum);
Serial.println("Character " + charNum + " of " + stringOne + " is " + thisChar);
}
}
can be fixed by casting charNum to a String.
What is the expected output? What do you see instead?
Expected:
String character functions:
Character 0 of this is t
Character 1 of this is h
Character 2 of this is i
Character 3 of this is s
Got:
StringCharacterFunctions.cpp: In function 'void loop()':
StringCharacterFunctions:25: error: invalid operands of types 'const char*' and 'const char [5]' to binary 'operator+'
The text was updated successfully, but these errors were encountered:
This is Issue 304 moved from a Google Code project.
Added by 2010-07-27T20:26:20.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Invalid).
Original labels: Type-Defect, Priority-Medium, Component-Core
Original description
What steps will reproduce the problem?
This code:
void loop() {
String stringOne = "this";
for (int charNum = 0; charNum < stringOne.length(); charNum++) {
char thisChar = stringOne.charAt(charNum);
Serial.println("Character " + charNum + " of " + stringOne + " is " + thisChar);
}
}
can be fixed by casting charNum to a String.
What is the expected output? What do you see instead?
Expected:
String character functions:
Character 0 of this is t
Character 1 of this is h
Character 2 of this is i
Character 3 of this is s
Got:
StringCharacterFunctions.cpp: In function 'void loop()':
StringCharacterFunctions:25: error: invalid operands of types 'const char*' and 'const char [5]' to binary 'operator+'
The text was updated successfully, but these errors were encountered: