|
|

楼主 |
发表于 2006-1-20 09:59:29
|
显示全部楼层
There is vividing saying that Home sometime noding, Needless to say for me. Let's enter into the topic, How can I to implement this method of class, Well, I done like this:
- template <class Type>
- class List
- { public:
- ...
- void insert();
- void remove();
- ...
- private:
- ListNode<Type>* firstptr;
- LIstNode<Type>* lastptr;
- }
- template <class Type>
- class ListNode //This class is Interface used between List and Object.do nothing
- { // in its internal, just to storing Ojbect
- public:
- ...
-
- private:
- Type data;
- ListNode<Type>* nextptr; //is pointer to point next Object
- }
复制代码
Warmly weclome to discuss ,
Best regard |
|