?? ring.h
字號:
//******************
//** ring.h **
//******************
#ifndef RING
#define RING
struct Boy{ //小孩結構作為鏈表結點
int code;
Boy* next;
};
class Ring{ //環鏈表類定義
public:
Ring(int n);
void Count(int m); //數m個小孩
void PutBoy() const; //輸出當前小孩的編號
void ClearBoy(); //將當前小孩從鏈表中脫鉤
void Display(); //輸出圈中所有小孩
~Ring();
protected:
Boy* pBegin;
Boy* pivot;
Boy* pCurrent;
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -