问题 单项选择题

深圳证券交易所会员取得席位后,可根据业务需要向交易所申请设立( )交易单元。

A.1个或1个以上

B.3个或3个以上

C.5个或5个以上

D.若干个

答案

参考答案:A

解析:解  析:根据《证券交易所席位与交易单元管理细则》的规定,深证证券交易所会员取得席位后,可根据业务需要向交易所申请设立1个或1个以上的交易单元。故A选项正确。

问答题

【说明】 C++语言本身不提供对数组下标越界的判断。为了解决这一问题,在程序6中定义了相应的类模板,使得对厂任意类型的二维数组,可以在访问数组元素的同时,对行下标和列下标进行越界判断,并给出相应的提示信息。 #include<iostream.h> template <class T> class Array; template <class T> class ArrayBody { friend (1) T* tpBody; int iRows, iColumns, iCurrentRow; ArrayBody (int iRsz, int iCsz) { tpBody = (2) iRows = iRsz; iColumns =iCsz; 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 (column_error== true ) cerr << "列下标越界[" <<j << "]"; cout << "\n"; } return tpBody[iCurrentRow * iColumns +j]; }; ~ArrayBody ( ) { delete[] tpBody; } }; template <class T> class Array { ArrayBody<T> tBody; public: ArrayBody<T> & operator[] (int i) { (4) return tBody; } Array (int iRsz, int iCsz) : (5) {} }; void main() { Array<int>a1(10,20); Array<double>a2(3,5); int b1; double b2; b1=a1[-5][10]; //有越界提示:行下标越界[-5] b1=a1[10][15]; //有越界提示:行下标越界[10] b1=a1[1][4]; //没有越界提示 b2=a2[2][6]; //有越界提示:列下标越界[6] b2=s2[10][20]; //有越界提示:行下标越界[10]列下标越界[20] b2=a2[1][4]; //没有越界提示 }

多项选择题