边坡防护及防排水工程设计应符合以下规定:排水设施结构的设计使用年限应为()年。
A、30
B、50
C、60
D、100
参考答案:A
A.石油
B.核能
C.煤炭
D.电能
阅读下列说明和C++程序,将应填入(n)处的字句写在对应栏内。【程序1说明】 程序1中定义了数组的类模板,该模板使得对于任意类型的二维数组,可以在访问数组元素的同时,对行下标和列下标进行越界判断,并给出相应的提示信息(C++语言本身不提供对下标越界的判断)。【程序1】#include < iostream. h >template < class T > class Array2D;template < class T > class Array2DBody {friend (1) ; T * tempBody; int iRows, iColumns, iCurrentRow; Array2DBody(int Rows,int Cols) { tempBody = (2) ; iRows = Rows; iColumns = Cols; iCurrentRow = -1; }public: T& operator[ ] (int j){ bool row_ error, column_ error; row_ error = column_ error = false; try {if ( iCurrentRow < 0||iCurrentRow > = iRows)row_ error = true;if( j < 0||j > = iColumns) column_error = true;if( row_error = = true [ [ column_ error = = true)(3) ; } catch(char) { if (row_error = = true) cerr < < "行下标越界"[" < < iCurrentRow < < "]"; if( colmnn_error = = true) cerr< <"列下标越界[" < <j< <"]"; cout < < "\n"; } return tempBody[ iCurrentRow * iColumns + j ]; } ~ Array2 DBody ( ) { delete [ ] tempBody; } }; template < class T > class Array2D { Array2DBody < T > tBody; public: Array2DBody < T > & operalor[ ] (int i) { tBody, iCurreutRow = i; (4) ; Array2D(int Rows,int Cols): (5) {} };void main( ){ Array2D <int> al ( 10,20 ); Array2D <double> a2(3,5); int bl; double b2; b1=a1[-5][10];//有越界提示:行下标越界[-5] b1=a1[10][15];//有越界提示:行下标越界[10] b1=a1[1][4];//没有越界提示 b2=a2[2][6];//有越界提示:列下标越界[6] b2=a2[10][20];//有越界提示:行下标越界[10]列下标越界[20] b2=a2[1][4];//没有越界提示}