Advertisement
Guest User

flash_cpp

a guest
Feb 24th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. main.cpp:3:7: error: '__flash' does not name a type
  2.  const __flash char string[] = "string in flash";
  3.        ^~~~~~~
  4. main.cpp: In function 'int main()':
  5. main.cpp:6:12: error: 'string' was not declared in this scope
  6.      return string[2];
  7.             ^~~~~~
  8. main.cpp:6:12: note: suggested alternative: 'struct'
  9.      return string[2];
  10.             ^~~~~~
  11.             struct
  12. zsh: exit 1     avr-g++ -mmcu=atmega32 main.cpp
  13.  
  14.  
  15. #include <avr/io.h>
  16.  
  17. const __flash char string[] = "string in flash";
  18.  
  19. int main(void) {
  20.     return string[2];
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement