Go Down

Topic: The order of variable assignment causing error. (Read 1 time) previous topic - next topic

Nick Gammon

The String class does dynamic memory allocation. "Simple" classes don't. This, for example, would have the same effect and not suffer that problem:

Code: [Select]

const char * MY_STRING_1 = "abcd";
const char * MY_STRING_2 = "efgh"; 
const char * MY_STRING_3 = "ijkl";

Go Up