brokensidewalkfarm

2011-11-28: I suck at types/memory on C Part 2

Nov 28th, 2011
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.82 KB | None | 0 0
  1. #if defined(ARDUINO) && ARDUINO > 18
  2. #include <SPI.h>
  3. #endif
  4. #include <string.h>
  5.  
  6. // #wtf this whole thing works
  7. /*
  8. String stringOne = "Hello String"; // char var[13] right? = 12 char + null?
  9. String argh[3][3]={
  10. {stringOne,stringOne,stringOne},
  11. {stringOne,stringOne,stringOne},
  12. {stringOne,stringOne,stringOne}
  13. };
  14. */
  15.  
  16. String argh[3][3][20]={
  17. {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'},
  18. {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'},
  19. {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'},
  20. };
  21.  
  22. void setup() {
  23.   Serial.begin(9600);
  24. Serial.println( argh[0][1] );
  25. delay(1000);
  26.   argh[0][1]="TeeHee";
  27. Serial.println( argh[0][1] );
  28. delay(1000);
  29. }
  30.  
  31. void loop()
  32. {
  33. Serial.println( argh[0][1] );
  34. delay(1000);
  35. }
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment