class customArray {
public:
int data[10];
customArray() {
for (auto&& d : data) d = 7;
}
void print() {
for (auto&& d : data) {
Serial.print(d); Serial.write(' ');
}
Serial.println();
}
customArray& operator=(const int(&arr)[10]) {
for (int i = 0; i < sizeof arr / sizeof *arr; ++i) {
data[i] = arr[i];
}
return *this;
}
} ;
customArray a1;
void setup() {
Serial.begin(115200);
a1.print();
a1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
a1.print();
}
void loop() {}