Re: [問題] 95海大資結-stack

看板Grad-ProbAsk作者 (艾斯寇德)時間15年前 (2009/03/26 23:05), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《hsiehdler (hsiehdler)》之銘言: : Finish the C++ program for stack : Stack<int, 10> s1; : Stack<float, 20> s2; : Stack has 4 Functions : Push //insert item : Pop //remove item : isEmpty //If the numbr of items is 0 return TRUE else return FALSE : isFull // If the stack is full return TRUE else return FALSE : 1.這題要 finish 的部分是哪裡? template class 而且有資料量上界 : 2.給兩個不同型態的stack,其意義又為何? 這只是特化的意思,暗示你的template型別參數至少有兩個<typename,int>是必須要填的 : 謝謝的啦~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.227.224.159

03/27 11:34, , 1F
謝謝~雖然已經忘記template,不過翻翻書應該有!謝啦~
03/27 11:34, 1F
文章代碼(AID): #19ovcYD5 (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #19ovcYD5 (Grad-ProbAsk)