中文字幕综合一区,伊人av网,欧美中日韩在线,亚洲国产香蕉视频,黄视频在线免费,天天操天天爱天天爽,狠狠躁天天躁

專業(yè)軟件設計師網(wǎng)站|服務平臺|服務商(加客服微信:cnitpm或QQ:947530340進軟件設計師學霸群)

軟題庫 學習課程
當前位置:信管網(wǎng) >> 軟件設計師 >> 每日一練 >> 文章內容
軟件設計師案例分析每日一練試題(2024/4/18)

軟件設計師案例分析當天每日一練試題地址:www.jazzmuze.com/exam/ExamDayAL.aspx?t1=4

往期軟件設計師每日一練試題匯總:www.jazzmuze.com/class/27/e4_1.html

軟件設計師案例分析每日一練試題(2024/4/18)在線測試:www.jazzmuze.com/exam/ExamDayAL.aspx?t1=4&day=2024/4/18

點擊查看:更多軟件設計師習題與指導

軟件設計師案例分析每日一練試題內容(2024/4/18)

試題六
11、[程序6]
#include<ioStream.h>
template<class T>class Array;
template<class T>class ArrayBody{
friend  (1)  ;
T* tpBody;
int iRows,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=;
if(j<0|| j≥iColumns
column_error=;
if(row_error==true || column_error==true)
(3)  ;
}
eatch(char) {
if(row error==true)
cerr<<“行下標越界[“<<iCurrentRow<<”]”;
if(column error==true)
cerr<<“列下標越界[“<<j<<”]”;
cout<<“\n”;
}
return tpBody[iCurrentRow * iColumns+j];
}
~ArrayBody(){delere[]tpBody;}
};
template<class T>class Array {
ArrayBody<T> tBody;
public:
ArrayBody<T> & operator[](int i){
(4)  ;
return tBody;
};


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=a2[10][20];         / * 有越界提示:行下標越界[10]列下標越界[20] * /
b2=a2[1][4];           / * 沒有越界提示 * /
}

信管網(wǎng)試題答案與解析:www.jazzmuze.com/exam/ExamDayAL.aspx?t1=4&day=2024/4/18

信管網(wǎng)考友試題答案分享:

信管網(wǎng)試題答案與解析:www.jazzmuze.com/exam/ExamDayAL.aspx?t1=4&day=2024/4/18

信管網(wǎng)訂閱號

信管網(wǎng)視頻號

信管網(wǎng)抖音號

溫馨提示:因考試政策、內容不斷變化與調整,信管網(wǎng)網(wǎng)站提供的以上信息僅供參考,如有異議,請以權威部門公布的內容為準!

信管網(wǎng)致力于為廣大信管從業(yè)人員、愛好者、大學生提供專業(yè)、高質量的課程和服務,解決其考試證書、技能提升和就業(yè)的需求。

信管網(wǎng)軟考課程由信管網(wǎng)依托10年專業(yè)軟考教研傾力打造,教材和資料參編作者和資深講師坐鎮(zhèn),通過深研歷年考試出題規(guī)律與考試大綱,深挖核心知識與高頻考點,為學員考試保駕護航。面授、直播&錄播,多種班型靈活學習,滿足不同學員考證需求,降低課程學習難度,使學習效果事半功倍。

相關內容

發(fā)表評論  查看完整評論  

推薦文章

精選

課程

提問

評論

收藏