0903 C++類的運算符重載、靜態成員與繼承

Part 1.梳理思維導圖

一.運算符重載

1.運算符重載的作用

使原本只能對基本數據類型生效的運算符,在重載后,滿足可以對構造類型數據生效。

2.關系運算符重載

? ? ? ? a.關系運算符種類

>???????? >= ????????< ????????<= ????????==???????? !=

? ? ? ? b.分析參數

表達式:左值 關系運算符 右值

左值:只能為左值

右值:可以為左值,也可以為右值

返回值:bool(ture or false)

? ? ? ? c.函數格式

成員函數:bool operator關系運算符(const 類名 &R) const

全局函數:bool operator關系運算符(const類名 &L,const 類名 &R)

? ? ? ? d.分析

因為返回值使bool類型,所以函數頭為bool;

operator關系運算符為函數名,由于成員函數的實現方式是左值調用函數參數為右值,所以參數只有右值;

由于不改變右值,所以該成員函數后面加上const,使其成為常成員函數;

全局函數中實現方式為一個函數調用左值和右值就行關系運算,所以參數為兩個,因為關系運算不改變參數值,所以加const

? ? ? ? e.例子

以關系運算符>為例,當需要全局函數實現時,需要在類內添加友元

#include <iostream>using namespace std;class num
{
//    friend const num operator+(const num &L,const num &R);
//    friend bool operator>(const num &L,const num &R);
private:int a;int b;
public:num(){}num(int a,int b):a(a),b(b){}const num operator+(const num &R) const{num temp;temp.a = a + R.a;temp.b = b + R.b;return temp;}//成員函數實現bool operator>(const num &R) const{if(a > R.a && b < R.b)return true;elsereturn false;}void show(){cout << "a = " << a << " b = " << b << endl;}
};//const num operator+(const num &L,const num &R)
//{
//    num temp;
//    temp.a = L.a + R.a;
//    temp.b = L.b + R.b;
//    return temp;
//}//全局函數實現,需要在類內添加友元
//bool operator>(const num &L,const num &R)
//{
//    if(L.a > R.a && L.b < R.b)
//        return true;
//    else
//        return false;
//}ostream & operator<<(ostream &cout,const num &n)
{cout << n.a << " " << n.b << endl;return cout;
}istream & operator>>(istream &cin,num &n)
{cin >> n.a >> n.b;return cin;
}int main()
{num n1(2,3);num n2(3,4);num n3 = n1+n2;n3.show();if(n1 > n2)cout << "n1 > n2" << endl;elsecout << "n1 < n2" << endl;return 0;
}

3.賦值運算符重載

? ? ? ? a.賦值運算符種類

+=? ? ? ? -=? ? ? ? *=? ? ? ? /=? ? ? ? %=

? ? ? ? b.分析參數

表達式:左值 賦值運算符 右值(a += b)

左值:只能為左值

右值:可以為左值,也可以為右值

返回值:自身的引用

? ? ? ? c.函數格式

成員函數:類名 &operator賦值運算符(const 類名 &R)

全局函數:類名 &operator賦值運算符(類名 &L,const 類名 &R)

? ? ? ? d.分析

因為成員函數和全局函數返回的均是左值的引用,所以函數的返回值類型為 類名 &;

成員函數實現方式時將右值作為參數給左值調用,所以只有右值為參數;

全局變量需要二者均為參數,但是由于右值會發生變化,所以只有左值加const;

? ? ? ? e.例子
#include <iostream>using namespace std;class num
{
//    friend const num operator+(const num &L,const num &R);
//    friend bool operator>(const num &L,const num &R);
//    friend num & operator+=(num &L,const num &R);private:int a;int b;
public:num(){}num(int a,int b):a(a),b(b){}const num operator+(const num &R) const{num temp;temp.a = a + R.a;temp.b = b + R.b;return temp;}bool operator>(const num &R) const{if(a > R.a && b < R.b)return true;elsereturn false;}//成員函數實現num &operator+=(const num &R){a = a + R.a;b = b + R.b;return *this;}void show(){cout << "a = " << a << " b = " << b << endl;}
};//const num operator+(const num &L,const num &R)
//{
//    num temp;
//    temp.a = L.a + R.a;
//    temp.b = L.b + R.b;
//    return temp;
//}//bool operator>(const num &L,const num &R)
//{
//    if(L.a > R.a && L.b < R.b)
//        return true;
//    else
//        return false;
//}//全局函數實現
//num & operator+=(num &L,const num &R)
//{
//    L.a = L.a + R.a;
//    L.b = L.b + R.b;
//    return  L;
//}int main()
{num n1(2,3);num n2(3,4);num n3 = n1+n2;n3.show();//    if(n1 > n2)
//        cout << "n1 > n2" << endl;
//    else
//        cout << "n1 < n2" << endl;n1 += n2 += n3;n1.show();n2.show();n3.show();return 0;
}

4.自增自減運算符

? ? ? ? a.自增自減運算符種類

++(前自增和后自增)? ? ? ? --(前自減和后自減)

? ? ? ? b.分析參數

表達式:前:自增自減運算符 值(++a)? ? ? ? 后:值 自增自減運算符(a++)

值:只能為左值

返回值:前:自身的引用? ? ? ? 后:右值

? ? ? ? c.函數格式

成員函數:前:類名 &operator自增自減運算符()

? ? ? ? ? ? ? ? ? 后:const 類名 operator自增自減運算符(int )

全局函數:前:類名 &operator自增自減運算符(類名 &O)

? ? ? ? ? ? ? ? ? 后:const 類名 operator自增自減運算符(類名 &O,int)

? ? ? ? d.前自增和后自增的區別

前自增返回段值是一個左值,可以繼續被使用于函數,而后自增返回的是一個右值,不能被繼續適用于函數

????????e.分析

因為自增自減函數只需要調用自己,所以成員函數內沒參數,全局函數內參數為自己;

前自增函數和后自增函數都是一樣的引用,為了能滿足函數重載,使函數使用的更方便,在后自增函數中增加一個啞元,使其滿足函數重載的定義(參數個數不同或者參數類型不同);

前自增的返回值類型是類名 &(類的引用)是個左值,后自增返回的是類名(類的右值返回)是個右值;

? ? ? ? f.例子

因為后自增是返回沒自增前的值,所以需要定義一個新的臨時類成員,用于返回

#include <iostream>using namespace std;class num
{
//    friend const num operator+(const num &L,const num &R);
//    friend bool operator>(const num &L,const num &R);
//    friend num & operator+=(num &L,const num &R);
//    friend num &operator++(num &L);
//    friend const num operator++(num &L,int);
private:int a;int b;
public:num(){}num(int a,int b):a(a),b(b){}const num operator+(const num &R) const{num temp;temp.a = a + R.a;temp.b = b + R.b;return temp;}bool operator>(const num &R) const{if(a > R.a && b < R.b)return true;elsereturn false;}num &operator+=(const num &R){a = a + R.a;b = b + R.b;return *this;}//成員函數實現前自增num &operator++(){a++;b++;return *this;}//成員函數實現后自增const num operator++(int){num temp;temp.a = a++;temp.b = b++;return temp;}void show(){cout << "a = " << a << " b = " << b << endl;}
};//const num operator+(const num &L,const num &R)
//{
//    num temp;
//    temp.a = L.a + R.a;
//    temp.b = L.b + R.b;
//    return temp;
//}//bool operator>(const num &L,const num &R)
//{
//    if(L.a > R.a && L.b < R.b)
//        return true;
//    else
//        return false;
//}//num & operator+=(num &L,const num &R)
//{
//    L.a = L.a + R.a;
//    L.b = L.b + R.b;
//    return  L;
//}//全局函數實現前自增
//num &operator++(num &L)
//{
//    ++L.a;
//    ++L.b;
//    return L;
//}//全局函數實現后自增
//const num operator++(num &L,int)
//{
//    num temp;
//    temp.a = L.a++;
//    temp.b = L.b++;
//    return temp;
//}int main()
{num n1(2,3);num n2(3,4);num n3 = n1+n2;n3.show();//    if(n1 > n2)
//        cout << "n1 > n2" << endl;
//    else
//        cout << "n1 < n2" << endl;//    n1 += n2 += n3;
//    n1.show();
//    n2.show();
//    n3.show();cout << "++++++++++++++++++" << endl;n1.show();++n1;n1.show();cout << "++++++++++++++++++" << endl;n1.show();n2.show();n2 = n1++;n1.show();n2.show();return 0;
}

5.插入提取運算符重載

? ? ? ? a.插入提取運算符類型

<<插入運算符? ? ? ? >>提取運算符

? ? ? ? b.分析參數

表達式:左值 插入提取運算符 右值(cout << a)

左值:istream類的cin 或者 ostream類的cout

右值:類成員

返回值:iostram類的cin或者cout的引用

? ? ? ? c.函數格式

成員函數:因為返回值類型為iostram類,調用的函數為該類的函數,不適合在右值類內創建成員函數

全局函數:cout:ostream &operator<<(ostream &cout,const 類名 &a)

? ? ? ? ? ? ? ? ? cin:istream &operator>>(istream &cin,類名 &a)

? ? ? ? d.例子
#include <iostream>using namespace std;class num
{
//    friend const num operator+(const num &L,const num &R);
//    friend bool operator>(const num &L,const num &R);
//    friend num & operator+=(num &L,const num &R);
//    friend num &operator++(num &L);
//    friend const num operator++(num &L,int);friend ostream & operator<<(ostream &cout,const num &n);friend istream & operator>>(istream &cin,num &n);
private:int a;int b;
public:num(){}num(int a,int b):a(a),b(b){}const num operator+(const num &R) const{num temp;temp.a = a + R.a;temp.b = b + R.b;return temp;}bool operator>(const num &R) const{if(a > R.a && b < R.b)return true;elsereturn false;}num &operator+=(const num &R){a = a + R.a;b = b + R.b;return *this;}num &operator++(){a++;b++;return *this;}const num operator++(int){num temp;temp.a = a++;temp.b = b++;return temp;}void show(){cout << "a = " << a << " b = " << b << endl;}
};//const num operator+(const num &L,const num &R)
//{
//    num temp;
//    temp.a = L.a + R.a;
//    temp.b = L.b + R.b;
//    return temp;
//}//bool operator>(const num &L,const num &R)
//{
//    if(L.a > R.a && L.b < R.b)
//        return true;
//    else
//        return false;
//}//num & operator+=(num &L,const num &R)
//{
//    L.a = L.a + R.a;
//    L.b = L.b + R.b;
//    return  L;
//}//num &operator++(num &L)
//{
//    ++L.a;
//    ++L.b;
//    return L;
//}//const num operator++(num &L,int)
//{
//    num temp;
//    temp.a = L.a++;
//    temp.b = L.b++;
//    return temp;
//}//全局函數實現<<
ostream & operator<<(ostream &cout,const num &n)
{cout << n.a << " " << n.b << endl;return cout;
}//全局函數實現>>
istream & operator>>(istream &cin,num &n)
{cin >> n.a >> n.b;return cin;
}int main()
{num n1(2,3);num n2(3,4);num n3 = n1+n2;n3.show();//    if(n1 > n2)
//        cout << "n1 > n2" << endl;
//    else
//        cout << "n1 < n2" << endl;//    n1 += n2 += n3;
//    n1.show();
//    n2.show();
//    n3.show();cout << "++++++++++++++++++" << endl;n1.show();++n1;n1.show();cout << "++++++++++++++++++" << endl;n1.show();n2.show();n2 = n1++;n1.show();n2.show();return 0;
}

二.靜態成員

1.目的

申請靜態成員是讓每個類的這個靜態成員實現共享

2.注意事項

靜態成員不能在類內初始化,只能在類外初始化

靜態成員函數只能訪問靜態成員

3.格式

class 類名
{int a;static 數據類型 變量名; // 靜態數據成員static 返回值類型 函數名(形參列表)// 靜態成員函數{ }};數據類型 類名::變量名 = 初始化;

4.例子

該函數為模擬銀行存儲,balance為余額,rate為利率,靜態成員利率會在函數外改變,并使每一個賬戶成員利率一起改,靜態函數static double getrate()只能調用靜態成員rate,static double getmenory(Bankaccent &accent)靜態函數為了調用非靜態成員balance,只能調用類對象再調用

#include <iostream>using namespace std;class Bankaccent
{
private:double balance;static double rate;
public:Bankaccent(){}Bankaccent(double balance):balance(balance){};static double getrate(){return rate;}static void setrate(double setrate){rate = setrate;}static double getmenory(Bankaccent &accent){return accent.balance*(1+rate);}};double Bankaccent::rate = 0.05;int main()
{Bankaccent accent1(1000);cout << Bankaccent::getrate() << endl;Bankaccent::setrate(0.06);cout << Bankaccent::getrate() << endl;cout << Bankaccent::getmenory(accent1) << endl;return 0;
}

三.繼承

1.目的

1.實現代碼的復用性(重用性)

2.建立父類和子類之間的聯系

3.通過繼承 實現多態

2.繼承的概念

在已有的一個類基礎上,衍生出一個新的類,此為繼承

被繼承的類成為父類

繼承的類成為子類

子類擁有父類所有成員和成員函數

3.格式

class 類名 : 繼承方式 類名
{子類的拓展;
};

4.繼承方式

1.public:父類的成員繼承方式按原繼承方式保存。原父類中,public,protected類可以訪問private子類不能訪問

2.protected:父類的成員繼承方式按原繼承方式為public改為protected保存,其他繼承方式不變。原父類中,public,protected類可以訪問private子類不能訪問

3.private:父類的成員繼承方式全按private繼承方式保存。原父類中,public,protected類可以訪問private子類不能訪問

Part 2.程序

搭建一個貨幣的場景,創建一個名為 RMB 的類,該類具有整型私有成員變量 yuan(元)、jiao(角)和 fen(分),并且具有以下功能:

(1)重載算術運算符 + 和 -,使得可以對兩個 RMB 對象進行加法和減法運算,并返回一個新的 RMB 對象作為結果。

(2)重載關系運算符 >,判斷一個 RMB 對象是否大于另一個 RMB 對象,并返回 true 或 false。

(3)重載前置減減運算符 --,使得每次調用時 RMB 對象的 yuan、jiao 和 fen 分別減 1

(4)重載后置減減運算符 --,使得每次調用時 RMB 對象的 yuan、jiao 和 fen 分別減 1

(5)另外, RMB 類還包含一個靜態整型成員變量 count,用于記錄當前已創建的 RMB 對象的數量。每當創建一個新的 RMB 對象時,count 應該自增 1;每當銷毀一個 RMB 對象時,count 應該自減 1。

要求,需要在main 函數中測試上述RMB 類的功能

#include <iostream>using namespace std;class RMB
{
private:int yuan;int jiao;int fen;static int count;
public:RMB(){countplus();}RMB(int yuan,int jiao,int fen):yuan(yuan),jiao(jiao),fen(fen){countplus();}RMB(const RMB& other):yuan(other.yuan),jiao(other.jiao),fen(other.fen){countplus();}~RMB(){countdecrease();}const RMB operator+(const RMB &R){RMB temp;temp.yuan = yuan+R.yuan;temp.jiao = jiao+R.jiao;temp.fen = fen+R.fen;return temp;}const RMB operator-(const RMB &R){RMB temp;temp.yuan = yuan-R.yuan;temp.jiao = jiao-R.jiao;temp.fen = fen-R.fen;return temp;}bool operator>(const RMB &R){if(yuan > R.yuan)return true;elsereturn false;}RMB &operator--(){--yuan;--jiao;--fen;return *this;}const RMB operator--(int){RMB temp;temp.yuan = yuan--;temp.jiao = jiao--;temp.fen = fen--;return temp;}static void countplus(){count++;}static void countdecrease(){count--;}static int countshow(){return count;}void show(){cout << yuan << " " << jiao << " " << fen << endl;}
};int RMB::count = 0;int main()
{{cout << RMB::countshow() << endl;RMB r1(100,99,88);cout << RMB::countshow() << endl;RMB r2(55,101,76);cout << RMB::countshow() << endl;cout << "算數運算符+" << endl;r1 = r1+r2;r1.show();cout << "算數運算符-" << endl;r1 = r1-r2;r1.show();cout << "關系運算符>" << endl;bool a = r1 > r2;cout << a << endl;cout << "前自減運算符--" << endl;--r1;r1.show();cout << "后自減運算符--" << endl;RMB r3 = r2--;r3.show();r2.show();}cout << RMB::countshow() << endl;return 0;
}

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/pingmian/95321.shtml
繁體地址,請注明出處:http://hk.pswp.cn/pingmian/95321.shtml
英文地址,請注明出處:http://en.pswp.cn/pingmian/95321.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Cloudflare安全規則實用指南:從路徑攔截到IP限制的10個經典范例

前言&#xff1a;在Cloudflare的安全防護體系中&#xff0c;自定義規則是抵御特定威脅的“精準武器”。除了基礎的路徑攔截&#xff0c;日常運維中還有許多高頻場景需要針對性配置。本文將通過10個實用范例&#xff0c;帶你掌握Cloudflare規則的靈活用法&#xff0c;覆蓋路徑防…

數據結構(時空復雜度)

目錄 一、算法復雜度 二、時間復雜度 1.不同時間度代碼舉例 三、空間復雜度 一、算法復雜度 算法復雜度&#xff08;評估算法優劣一個重要指標&#xff09;分為時間復雜度和空間復雜度。 時間復雜度是指執行算法所需要的計算工作量&#xff0c;而空間復雜度是指執行這個…

ESXI8多網卡鏈路聚合

1. 背景 測試服務器只有千兆網卡&#xff0c;增加上行帶寬&#xff0c;使用兩塊網卡做鏈路聚合。 2. 環境 VM ESXI 8.0 華為交換機 S5735S 3. 交換機配置 負載均衡方式采用了src-dst-ipTrunk模式采用了手工負載分擔&#xff08;測試了靜態LACP&#xff0c;未成功&#xff09;4.…

從“人工驅動”到“AI協同”:良策金寶AI如何助力設計院數智化躍遷?

在“雙碳”目標驅動下&#xff0c;電力工程項目的數量與復雜度持續攀升。設計院面臨“項目多、周期短、人力緊”的三重壓力&#xff0c;傳統的“人工驅動”模式已難以為繼。良策金寶AI&#xff0c;正是這場變革的核心引擎。它以AI驅動數智化服務&#xff0c;為工程設計企業提供…

vue3 vite 自適應方案

兩種方案&#xff1a; 1 使用 postcss-pxtorem插件 npm install postcss-pxtorem autoprefixer --save-dev # 或 yarn add postcss-pxtorem autoprefixer -D 2、postcss-px-to-viewport npm install postcss-px-to-viewport --save-dev 或 yarn add postcss-px-to-viewport -D …

華為研發投資與管理實踐(IPD)讀書筆記

在全球科技產業競爭日趨激烈的背景下&#xff0c;企業研發管理早已告別 “依賴個體經驗、靠運氣突破” 的粗放時代&#xff0c;如何將研發創新從 “偶然成功” 轉化為 “可復制、可持續的必然成果”&#xff0c;成為所有追求長期競爭力的企業必須破解的命題。華為&#xff0c;作…

【LeetCode_283】移動零

刷爆LeetCode系列LeetCode第283題&#xff1a;github地址前言題目描述題目與思路分析代碼實現算法代碼優化LeetCode第283題&#xff1a; github地址 有夢想的電信狗 前言 本文用C實現 LeetCode 第283題 題目描述 題目鏈接&#xff1a;https://leetcode.cn/problems/move-z…

一文弄懂C/C++不定參數底層原理

目錄 一、C語言的可變參數&#xff1a;基于棧幀的手動讀取 &#xff08;1&#xff09;C函數調用的棧幀結構 &#xff08;2&#xff09;C 可變參數的 4 個核心宏&#xff1a;如何 “手動讀棧” &#xff08;3&#xff09;實戰代碼&#xff1a;用 C 可變參數實現求和函數 &a…

【Android】【設計模式】抽象工廠模式改造彈窗組件必知必會

寫一個 Android 版本的抽象工廠彈窗 Manager 管理器&#xff0c;使用 DialogFragment 實現&#xff0c;這樣能更貼近真實的開發場景。結構設計 抽象產品&#xff1a;BaseDialogFragment&#xff08;繼承 DialogFragment&#xff09;具體產品&#xff1a;LoginDialogFragment, …

Win64OpenSSL-3_5_2.exe【安裝步驟】

官網下載 注意&#xff1a;科學上網&#xff0c;可以加速下載速度&#xff01; Win32/Win64 OpenSSL Installer for Windows - Shining Light Productions 下載后得到&#xff1a;Win64OpenSSL-3_5_2.exe 雙擊安裝 修改安裝路徑&#xff1a; 默認就選擇第一個。 重要提醒?…

華為云云原生架構賦能:大騰智能加速業務創新步伐

巨大的渦輪、細小的螺絲&#xff0c;一臺航天飛機發動機的三維模型呈現在屏幕上&#xff0c;遠程同事同步協作&#xff0c;一臺復雜設備在工程師高效的協同中不斷完善。深圳市大騰信息技術有限公司&#xff0c;正是這場工業變革的推動者之一。大騰智能以“云原生工業”的融合為…

基于https+域名的Frp內網穿透教程(Linux+Nginx反向代理)

系列文章目錄 基于http公網ip的Frp內網穿透教程(win server) 基于http域名的Frp內網穿透教程(win serverIIS反向代理) 基于http公網ip的Frp內網穿透教程(Linux) 基于https域名的Frp內網穿透教程(LinuxNginx反向代理) 目錄 系列文章目錄 前言 一、Frp是什么&#xff1f; 1. …

裸機程序(1)

一、裸機裸機是一個在計算機硬件與軟件開發領域高頻出現的概念&#xff0c;核心定義是 “未安裝操作系統&#xff08;OS&#xff09;&#xff0c;僅包含硬件本身&#xff08;或僅運行最底層硬件驅動 / 控制程序&#xff09;的設備”。在電腦中&#xff0c;裸機會映射代碼到cpu&…

95%企業AI失敗?揭秘LangGraph+OceanBase融合數據層如何破局!?

本文較長&#xff0c;建議點贊收藏&#xff0c;以免遺失。更多AI大模型應用開發學習視頻及資料&#xff0c;盡在聚客AI學院。不知道你們有沒有遇到過&#xff0c;在我們一些實際落地的AI項目中&#xff0c;雖然前期“Demo 很驚艷&#xff0c;但上線后卻無人問津”。你們有沒有想…

樹莓集團產教融合:數字學院踐行職業教育“實體化運營”要求

在職業教育改革不斷深化的背景下&#xff0c;“實體化運營” 成為推動職業教育高質量發展的重要方向。樹莓集團積極響應這一要求&#xff0c;以產教融合為核心&#xff0c;打造數字學院&#xff0c;切實踐行職業教育 “實體化運營”&#xff0c;為培養高素質數字領域專業人才探…

ELK 統一日志分析系統部署與實踐指南(上)

#作者&#xff1a;張桐瑞 文章目錄1 ELK 技術棧概述1.1ELK 核心組件詳解1.2 ELK 工作流程2 ELK部署2.1 環境描述2.1.7 配置es集群下篇&#xff1a;《ELK 統一日志分析系統部署與實踐指南&#xff08;下&#xff09;》 鏈接: [https://blog.csdn.net/qq_40477248/article/detail…

上位機知識篇---poweshellcmd

要理解 PowerShell 和 CMD 的區別&#xff0c;我們可以先打個通俗的比方&#xff1a;CMD 像老式功能機&#xff0c;只能干打電話、發短信這些 “基礎活”&#xff1b;而 PowerShell 像智能手機&#xff0c;不僅能做基礎操作&#xff0c;還能裝 APP、玩復雜功能&#xff0c;甚至…

利用 Python 繪制環形熱力圖

暑假伊始&#xff0c;Coldrain 參加了學校舉辦的數模集訓&#xff0c;集訓的過程中&#xff0c;遇到了需要展示 59 個特征與 15 個指標之間的相關性的情況&#xff0c;在常用的圖表不大合適的情況下&#xff0c;學到了一些厲害的圖表&#xff0c;但是似乎千篇一律都是用 R 語言…

【序列晉升】27 Spring Cloud Sleuth給分布式系統裝上透視鏡

Spring Cloud Sleuth作為微服務架構中的核心監控組件&#xff0c;通過輕量級的無侵入式跟蹤機制&#xff0c;解決了分布式系統中請求路徑復雜、問題定位困難的痛點。它自動為每個服務請求創建唯一的Trace ID&#xff0c;并為每個服務間調用生成Span ID&#xff0c;形成完整的調…

Linux(2)|入門的開始:Linux基本指令(2)

一、基本指令介紹 回顧上篇博客Linux(1)|入門的開始&#xff1a;Linux基本指令-CSDN博客&#xff0c;我們已經學習了mkdir目錄的創建&#xff0c;touch普通文件的創建&#xff0c;光有創建肯定是不行的&#xff0c;接下來就介紹我們的刪除指令 1、rmdir指令&&rm指令 …