是什麼意思,當有人代碼:return;唯一沒有返回值
template <class T>
void binaryTree<T>::in_order(Node <T>* node, void (*fun)(T&))
{
if (node == NULL)
return; //<-- what does this mean here
inorder(node->left, fun); //<-- how does this continue here
f(node->data);
inorder(node->right,fun);
}
的問題是,你怎麼有回報;不返回任何東西。這是做什麼的? **請注意,爲了清晰起見,我編輯了上面的代碼。
我編輯了代碼,使問題更加清晰 – user2884789
回答問題後,我滾動起來時,它嚇到了我。整個片段被改變了:-) – Abhineet
是的,我的糟糕的是把廢話代碼開始。 – user2884789