hello

what's the correct synthax for a function implementation which will return a private struct pointer?

Below, in green there is the type I want to be returned by the functioninsert.

In red the obvoius synthax error, sincesNodebelongs tocTree's scope.

edit: unclarity code correction

I've triedCode:`template <class T>`

class cTree {

private:

struct sNode {

...

};

sNode* insert (sNode*, T&);

...

public:

...

};

//function implementation

template <class T>

sNode* cTree<T>::insert (sNode* node, T& data) {

sNode *tmp;

...

return tmp;

}

but g++ gives me the sameCode:`cTree<T>::sNode* cTree<T>::insert (sNode* node, T& data) {`

error: expected constructor, destructor, or type conversion before ‘*’ token

I've also tried other "solutions" with no success and I'm still searching for a link with the right answer.

If anybody can help, thanks