main.cpp
1 | /*
| 2 | * rodataTest_avr-gcc-14.cpp
| 3 | *
| 4 | * Created: 20.05.2024 11:05:45
| 5 | * Author : devil-elec
| 6 | */
| 7 |
| 8 | #include <stdio.h>
| 9 | #include <stdlib.h>
| 10 | #include <avr/io.h>
| 11 |
| 12 | constexpr uint16_t myArray [] {
| 13 | 0,1,1,1,2,2,3,3,4,5,6,7,8,9,10,11,13,15,16,18,20,22,25,27,30,33,36,39,42,45,49,
| 14 | 53,57,61,65,70,75,79,85,90,96,101,107,114,120,127,134,141,148,156,164,172,181,189,198,208,217,227,237,247,
| 15 | 258,269,280,292,303,316,328,341,354,367,381,395,409,424,439,454,470,486,502,519,536,554,571,589,608,627,646,
| 16 | 666,686,706,727,748,770,792,814,837,860,884,908,932,957,982,1008,1034,1060,1087,1115,1143,1171,1200,1229,1259,
| 17 | 1289,1319,1350,1382,1414,1446,1479,1512,1546,1580,1615,1651,1686,1723,1759,1797,1835,1873,1912,1951,1991,2031
| 18 | };
| 19 |
| 20 | int main (void)
| 21 | {
| 22 | char buffer[256] {'\0'};
| 23 | constexpr uint16_t anz {sizeof(myArray)/sizeof(myArray[0])};
| 24 |
| 25 | while (1) {
| 26 | for (uint8_t i=0; i<anz; i++) {
| 27 | sprintf(buffer, "wert = %u", myArray[i]);
| 28 | }
| 29 |
| 30 | for (auto &v : myArray) {
| 31 | sprintf(buffer, "wert = %u", v);
| 32 | }
| 33 | }
| 34 |
| 35 | }
|
|