fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename T, size_t n>
  5. size_t length_of(T (&hello_world)[n]) {
  6. return n;
  7. }
  8.  
  9. int main() {
  10. int angel[1004];
  11. cout << length_of(angel) << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
1004