国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當前位置: 首頁 > news >正文

杭州網(wǎng)站建設wguser域名歸屬查詢

杭州網(wǎng)站建設wguser,域名歸屬查詢,cloudflare做侵權網(wǎng)站,python網(wǎng)站開發(fā)效率一、函數(shù)實現(xiàn)1、ClearSqStack(1)用途清理棧的空間。只需要棧頂指針和棧底指針相等,就說明棧已經(jīng)清空,后續(xù)新入棧的數(shù)據(jù)可以直接覆蓋,不用實際清理數(shù)據(jù),提升了清理效率。(2)源碼Statu…

一、函數(shù)實現(xiàn)

1、ClearSqStack

(1)用途

清理棧的空間。只需要棧頂指針和棧底指針相等,就說明棧已經(jīng)清空,后續(xù)新入棧的數(shù)據(jù)可以直接覆蓋,不用實際清理數(shù)據(jù),提升了清理效率。

(2)源碼

Status ClearSqStack(SqStack* S)
{JudgeAllNullPointer(S);S->TopPointer = S->BasePointer;Log("Clear SqStack   : OK\n",Info);return SuccessFlag;
}

(3)參數(shù)

參數(shù)名

說明

S

需要清理的SqStack*類型順序棧。

2、DestroyStack

(1)說明

銷毀棧。釋放申請的資源。

(2)源碼

Status DestroyStack(SqStack* S)
{JudgeAllNullPointer(S);free(S->BasePointer);S->TopPointer     = NULL;S->BasePointer    = NULL;S->SqStackMaxSize = 0;Log("Destroy SqStack : OK\n",Info);return SuccessFlag;
}

(3)參數(shù)

參數(shù)名

說明

S

需要銷毀的SqStack*類型順序棧。

3、PushSqStack

(1)說明

壓棧。判斷棧是否已滿,如果已滿報錯,反之將數(shù)據(jù)壓入棧頂即可。

(2)源碼

Status PushSqStack(SqStack* S, SqElemType SE)
{JudgeAllNullPointer(S);//判斷是否棧滿if(GetSqStackLen(S) >= S->SqStackMaxSize){Log("SqStack is Full, Data cannot be pushed\n",Warning);return FailFlag;}//相同結構體之間,可以直接賦值。*(S->TopPointer) = SE;//CopySqElemType(S->TopPointer, &SE);//printf("%p, %p\n",S->TopPointer->StudentNum, (&SE)->StudentNum);S->TopPointer++;Log("Push SqStack    : OK\n",Info);return SuccessFlag;
}

(3)參數(shù)

參數(shù)名

說明

S

需要壓棧的SqStack*類型順序棧。

SE

需要壓入棧的SqElemType類型數(shù)據(jù)。

4、PopSqStack

(1)說明

彈棧。判斷棧是否已空,如果是,就拋出錯誤。如果不是,就下移棧頂指針,將數(shù)據(jù)賦值給SE,作為傳出參數(shù)。

(2)源碼

Status PopSqStack(SqStack* S, SqElemType* SE)
{JudgeAllNullPointer(S);JudgeAllNullPointer(SE);if(JudgeSqStackIsEmpty(S) == SuccessFlag){Log("SqStack is Empty, Data cannot be poped\n",Warning);return FailFlag;}S->TopPointer--;*SE = *(S->TopPointer);//CopySqElemType(SE,S->TopPointer);//printf("%p, %p\n",S->TopPointer->StudentNum, SE->StudentNum);Log("Pop SqStack     : OK\n",Info);return SuccessFlag;
}

(3)參數(shù)

參數(shù)名

說明

S

需要初始化的SqStack*類型順序棧。

SE

需要彈出棧的SqElemType*類型數(shù)據(jù)。

二、虛機測試

gbase@czg2 LinearTable_Stack]$ make
gcc -Wall -O3 Log.c SqStack.c main.c -o TestSqStack[gbase@czg2 LinearTable_Stack]$ ./TestSqStack 
2023-2-14 9:53:20--Info--Init SqStack    : OK
2023-2-14 9:53:20--Info--Push SqStack    : OK
2023-2-14 9:53:20--Info--Push SqStack    : OK
2023-2-14 9:53:20--Info--Push SqStack    : OK
2023-2-14 9:53:20--Info--Push SqStack    : OK
2023-2-14 9:53:20--Info--Push SqStack    : OK
2023-2-14 9:53:20--Info--Push SqStack    : OK
2023-2-14 9:53:20--Warning--SqStack is Full, Data cannot be pushed
2023-2-14 9:53:20--Warning--SqStack is Full, Data cannot be pushed
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Debug--SqStack Data   :
StudentNum     : X666
StudentName    : Sun
StudentScore   : 100
+++++++++++++++
StudentNum     : X666
StudentName    : Sun
StudentScore   : 101
+++++++++++++++
StudentNum     : X666
StudentName    : Sun
StudentScore   : 102
+++++++++++++++
StudentNum     : X666
StudentName    : Sun
StudentScore   : 103
+++++++++++++++
StudentNum     : X666
StudentName    : Sun
StudentScore   : 104
+++++++++++++++
StudentNum     : X666
StudentName    : Sun
StudentScore   : 105
+++++++++++++++
SqStackLen     : 6
SqStackMaxSize : 6
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Info--Pop SqStack     : OK
2023-2-14 9:53:20--Debug--SqElemType Data:
StudentNum     : X666
StudentName    : Sun
StudentScore   : 105
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Info--Pop SqStack     : OK
2023-2-14 9:53:20--Debug--SqElemType Data:
StudentNum     : X666
StudentName    : Sun
StudentScore   : 104
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Info--Pop SqStack     : OK
2023-2-14 9:53:20--Debug--SqElemType Data:
StudentNum     : X666
StudentName    : Sun
StudentScore   : 103
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Info--Pop SqStack     : OK
2023-2-14 9:53:20--Debug--SqElemType Data:
StudentNum     : X666
StudentName    : Sun
StudentScore   : 102
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Info--Pop SqStack     : OK
2023-2-14 9:53:20--Debug--SqElemType Data:
StudentNum     : X666
StudentName    : Sun
StudentScore   : 101
2023-2-14 9:53:20--Debug--Judge SqStack  : Not Empty
2023-2-14 9:53:20--Info--Pop SqStack     : OK
2023-2-14 9:53:20--Debug--SqElemType Data:
StudentNum     : X666
StudentName    : Sun
StudentScore   : 100
2023-2-14 9:53:20--Debug--Judge SqStack  : Empty
2023-2-14 9:53:20--Warning--SqStack is Empty, Data cannot be poped
2023-2-14 9:53:20--Debug--Judge SqStack  : Empty
2023-2-14 9:53:20--Warning--SqStack is Empty, Data cannot be poped
2023-2-14 9:53:20--Debug--SqStack Data   :
SqStackLen     : 0
SqStackMaxSize : 6
2023-2-14 9:53:20--Info--Clear SqStack   : OK
2023-2-14 9:53:20--Info--Destroy SqStack : OK
http://m.aloenet.com.cn/news/42707.html

相關文章:

  • 優(yōu)秀網(wǎng)站頁面設計圖片蘭州模板網(wǎng)站seo價格
  • 直播網(wǎng)站怎么做站長工具百度百科
  • 網(wǎng)站建好了怎么做淘寶客seo指導
  • 偽類網(wǎng)站hyein seo官網(wǎng)
  • 網(wǎng)站 關于我們 模板免費網(wǎng)絡營銷推廣軟件
  • 網(wǎng)站開發(fā)都需要學什么深圳搜索競價賬戶托管
  • java企業(yè)網(wǎng)站商丘seo博客
  • 如何購買網(wǎng)站俄羅斯搜索引擎瀏覽器
  • 網(wǎng)頁制作圖片模板整站seo排名外包
  • 百度搜索優(yōu)化建議seo的基礎優(yōu)化
  • 網(wǎng)站都是什么軟件做的百度營銷推廣
  • 賀州網(wǎng)絡推廣青島seo建站
  • 做翻糖的網(wǎng)站百度分公司
  • seo網(wǎng)站建設微域名解析網(wǎng)站
  • 寶安網(wǎng)站設計排名網(wǎng)店代運營騙局流程
  • 京東網(wǎng)站建設百度高級搜索網(wǎng)址
  • 哪個軟件做網(wǎng)站最簡單長沙專業(yè)競價優(yōu)化首選
  • 安卓手機app下載網(wǎng)站優(yōu)化種類
  • 網(wǎng)站標題特殊符號長沙百度快速優(yōu)化排名
  • asp net做網(wǎng)站視頻購物網(wǎng)站哪個最好
  • 做雜志的模板下載網(wǎng)站有哪些貴陽百度推廣電話
  • 網(wǎng)站交互效果網(wǎng)絡營銷的步驟
  • 廈門國外網(wǎng)站建設公司廣州競價托管代運營
  • 深圳網(wǎng)站建設找哪家好中視頻自媒體平臺注冊
  • iis網(wǎng)站重定向設置百度寧波營銷中心
  • 園林網(wǎng)站免費模板學好seo
  • 北京企業(yè)網(wǎng)站開發(fā)多少錢網(wǎng)絡營銷環(huán)境宏觀微觀分析
  • 全球疫情每日數(shù)據(jù)查詢googleseo服務公司
  • dnf盜號網(wǎng)站怎么做阿亮seo技術顧問
  • 學習前端的網(wǎng)站學推廣網(wǎng)絡營銷去哪里