Assertion failed: (strChar=.) == (str=
R= r
G= s
B= t), file concat.ino, line 24.
Test concat failed
Test summary: 0 passed, 1 failed, 0 skipped, out of 1 test(s).
I don't think you can use that expression on the right, because none of the right-hand-side values are C++ Strings at permit concatenation using "+"; just chars and C pointers (to char arrays.)
I am agreed with the expression '\n'+col[i] is a byte, but I mean the expression strChar += '\n'+col[i]+"= "+tag[i]; is legal and it means strChar = strChar+'\n'+col[i]+"= "+tag[i]; that it works,
I think it is a source of errors. In my opinion is not a bad idea a new operator "=+++" that it means: strChar = strChar+'\n'+col[i]+"= "+tag[i]; because you are working with an acumulator of the same type of the leftthand to acumulate and it must consider righthand the entire expression like the above intuitive idea, near the human being language as high level language.
As conclusion for my "Tips & Tricks collection":
x += y; <=> x + ( y); and x =; equivalent to the expression x = x + ( y ); and not x = x + y;
In general works as expected: acumulatorString = acumulatorString + char + char* + String +....
Yeah, string handling in C sucks, and everything associated with it, too.
But you have to be much higher in the language definition hierarchy to change the "standardize language" behavior. They probably have very good reasons for not taking the Left hand side type into account when computing the right hand side, perhaps even more so than "it's always been that way" or "that's the RULE!"
You might have gotten it to work by including a case, something like: