fork download
  1. #include <thread>
  2.  
  3. template <class TYPE>
  4. void function(TYPE& data, std::size_t row, std::size_t column){
  5. data[row-1][column-1]=2;
  6. }
  7.  
  8. int main(){
  9. const int column(5),row(2);
  10. function(arr, row, column);
  11. std::array<std::array<int, column>, row> arr;
  12. return data[row-1][column-1];
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:10:14: error: 'arr' was not declared in this scope
     function(arr, row, column);
              ^
prog.cpp:12:12: error: 'data' was not declared in this scope
     return data[row-1][column-1];
            ^
stdout
Standard output is empty