fork download
  1. #include <iostream>
  2. #include <array>
  3. #include <limits>
  4. using namespace std;
  5. #define MAX_ADAPT_TRIGGERS 10
  6. struct TriggerWriter
  7. {
  8. std::array<uint16_t, MAX_ADAPT_TRIGGERS> trigger_idx_to_buffer_idx_;
  9. TriggerWriter():trigger_idx_to_buffer_idx_{{std::numeric_limits<uint16_t>::max()},}{}
  10. void print()
  11. {
  12. for(int i = 0; i< MAX_ADAPT_TRIGGERS; ++i)
  13. {
  14. cout<<" i "<<i<<" "<<trigger_idx_to_buffer_idx_[i]<<endl;
  15. }
  16. }
  17. };
  18. int main() {
  19. // your code goes here
  20. TriggerWriter obj;
  21. obj.print();
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
 i 0 65535
 i 1 0
 i 2 0
 i 3 0
 i 4 0
 i 5 0
 i 6 0
 i 7 0
 i 8 0
 i 9 0