Guest User

flash_cpp

a guest
Feb 24th, 2019
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×