Differences with C++

You still haven't posted any code. This compiled for me with "Arduino AVR Boards by Arduino", version 1.8.6. Works on Wokwi (don't have an Uno)

struct RGB : public Printable {
  byte R, G, B;
  RGB(byte R, byte G, byte B) : R(R), G(G), B(B) {}
  size_t printTo(Print& p) const override {
    size_t ret = 0;
    ret += p.print("R:");
    ret += p.print(R);
    ret += p.print(",G:");
    ret += p.print(G);
    ret += p.print(",B:");
    ret += p.print(B);
    return ret;    
  }
};

class Dimmer {
  RGB (&colors)[3];
public:
  Dimmer(RGB (&colors)[3]) : colors(colors) {}
  void task() {
    for (RGB &rgb : colors) {
      Serial.println(rgb);
    }
  }
};

void setup() {
  Serial.begin(115200);
  RGB data[] {
    {1, 1, 1}, 
    {2, 2, 2}, 
    {3, 3, 3},
  };
  Dimmer test {data};
  test.task();
}

void loop() {}