作者sunneo (艾斯寇德)
看板Grad-ProbAsk
标题Re: [问题] 95海大资结-stack
时间Thu Mar 26 23:05:03 2009
※ 引述《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
1F:推 hsiehdler:谢谢~虽然已经忘记template,不过翻翻书应该有!谢啦~ 03/27 11:34