fork download
  1. #include <iostream>
  2.  
  3. template <typename T, size_t SIZE>
  4. void print(const T(&array)[SIZE])
  5. {
  6. for(size_t i = 0; i < SIZE; i++)
  7. std::cout << array[i] << " ";
  8. }
  9. int main() {
  10. bool x[] = {1, 1, 1};
  11. print(x);
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5268KB
stdin
Standard input is empty
stdout
1 1 1