functions

Hi, I was wondering what the .zeroth() is used for in C++. It is used in my textbook but does not explain what it does.
I don't think .zeroth() is a function in any class in the STL (Standard template library) so I can't tell you what it does.

What I can tell you is that it is a member function of some class that takes zero arguments. To tell you more, I'd need to see code. Specifically, the definition of the function.
Last edited on
1
2
3
4
5
6
7
8
template<class test>
void table<test>::insert(const test & x)
{
    List<test> & which = theList[hash(x,theList.size() ) ];
    ListItr<test> itr = which.find(x);
    if(itr.isPastEnd())
        which.insert(x, which.zeroth());
}


This was the code snippet inside the book. Nothing else was given its a hash table implementation
Topic archived. No new replies allowed.