brokensidewalkfarm

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

Nov 28th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 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. String stringOne = "Hello String"; // char var[13] right? = 12 char + null?
  8. String argh[3][3]={
  9. {stringOne,stringOne,stringOne},
  10. {stringOne,stringOne,stringOne},
  11. {stringOne,stringOne,stringOne}
  12. };
  13.  
  14. // String fuck[3][3][20]; // yet this doesn't work? *scratches head* #wtf
  15.  
  16. void setup() {
  17.   Serial.begin(9600);
  18. Serial.println( argh[0][1] );
  19. delay(1000);
  20.   argh[0][1]="TeeHee";
  21. Serial.println( argh[0][1] );
  22. delay(1000);
  23. }
  24.  
  25. void loop()
  26. {
  27. Serial.println( argh[0][1] );
  28. delay(1000);
  29. }
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment