From: SF M. E. <el...@us...> - 2004-03-04 16:33:26
|
> Do you think that in general it is better to return an object rather > then NULL pointer? If so, why? The traditional or C style handling of linked list uses the NULL pointer as a special marker. It can be used in encapsulated C++ methods, too. Another design might be to connect the pointers to a ring. The STL consistently uses iterators. There is no need to deal with pointers directly. Please look at the section "Invariants", for example. http://www.zib.de/benger/STL/Container.html |