First, if you want a printing function for a class, the best way is to pass an output stream object to that function, like this:
template <typename E>
class SLinkedList {
...
void print ( std::ostream& os ) const;
};
This has the added advantage that you can choose to print to any kind of output stream, including file streams. Note the const qualifier: it indicates that this function does not modify the list object. I'll leave the implementation to you, you really only need to traverse the list and push each value on the stream (separated by blanks or commas, whatever you like).
Second, your function only returns the head - obviously you were stuck at the question on how to return the values of an entire list in a single return question; the short answer is: you can't (not easily anyway)! However, the suggestion above solves that problem, because there is no need to return anything - instead you just push the entire list on the stream object.
Third, once you have imlemented that function, you can add an override for the stream operator like this:
template <typename E>
std::ostream& operator<<( std::ostream& os, const SLinkedList<E> mylist) {
mylist.print(os);
return os;
}
With this operator, you can now print your objects by simply passing the objects themselves to the output stream:
SLinkedList<int> mylist;
...
std::cout << "My list contains: {" << mylist << "}" << std::endl;</int>