0
我有nodes.h其中CNode定義爲這樣如何寫型堆的一類函數
struct CNode
{
int data;
CNode* link;
};
然後,我有稱爲queue.h與此類定義一個有趣的功能的單獨標頭:
Class queue
{
public:
.... //other functions
CNode* front();
... //private members
};
我的工作是編寫queue.h的實現(queue.cpp)。 因此,我的問題是:我將如何在實現文件中爲此編寫原型?
我已經嘗試過這兩個沒有成功:
queue::CNode* front()
{}
queue::queue CNode*::front()
{}
任何指導,將不勝感激。
語法與往常一樣:返回值,名稱,參數。所以'CNode * queue :: front()' –