#include <thread>
template < class TYPE>
void function( TYPE& data, std:: size_t row, std:: size_t column) {
data[ row- 1 ] [ column- 1 ] = 2 ;
}
int main( ) {
const int column( 5 ) ,row( 2 ) ;
function( arr, row, column) ;
std:: array < std:: array < int , column> , row> arr;
return data[ row- 1 ] [ column- 1 ] ;
}
I2luY2x1ZGUgPHRocmVhZD4KCnRlbXBsYXRlIDxjbGFzcyBUWVBFPgp2b2lkIGZ1bmN0aW9uKFRZUEUmIGRhdGEsIHN0ZDo6c2l6ZV90IHJvdywgc3RkOjpzaXplX3QgY29sdW1uKXsKICAgIGRhdGFbcm93LTFdW2NvbHVtbi0xXT0yOwp9CgppbnQgbWFpbigpewogICAgY29uc3QgaW50IGNvbHVtbig1KSxyb3coMik7CiAgICBmdW5jdGlvbihhcnIsIHJvdywgY29sdW1uKTsKICAgIHN0ZDo6YXJyYXk8c3RkOjphcnJheTxpbnQsIGNvbHVtbj4sIHJvdz4gYXJyOwogICAgcmV0dXJuIGRhdGFbcm93LTFdW2NvbHVtbi0xXTsKfQ==
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