A function with class name
<p>Here is a code of a class of Linked List , i have a question on the function <code>Singly_linked_list *GetNext()</code>.What does that means if a class name is stated before the function name? Is that a data type?Also,same question on the data member <code>Singly_linked_list *nextPtr</code>.I Please help
Thank you</p>

<pre><code>class Singly_linked_list // Use a class Singly_linked_list to represent an object{
public:
// constructor initialize the nextPtr
Singly_linked_list()
{
    nextPtr = 0; // point to null at the beginning
}

// get a number
int GetNum()
{
    return number;
}

// set a number
void SetNum(int num)
{
    number = num;
}

// get the next pointer
Singly_linked_list *GetNext()
{
    return nextPtr;
}

// set the next pointer
void SetNext(Singly_linked_list *ptr)
{
    nextPtr = ptr;
}

 private:
int number;
Singly_linked_list  *nextPtr;
 };
</code></pre>
