C++[非常与IO]

打印 上一主题 下一主题

主题 1048|帖子 1048|积分 3144

  1. 2023-3-17首次编辑
复制代码

  
Unit 10:非常

一.概念

   

  • 非常处理就是处理步伐中的错误
  • 错误是指在步伐运行的过程中发生的一些非常事故
  二.作用

   办理C语言处理非常的方法缺陷:
  

  • 返回值意思不明确
  • 返回值只能返回一条信息
  • 返回值可以忽略
  三.根本语法与执行流程

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. int func(int a, int b)
  5. {
  6.         if (b==0)
  7.         {
  8.                 //第二步:抛出异常
  9.                 throw 10; //抛出一个int类型的异常
  10.                 cout << "throw后的代码" << endl;
  11.         }
  12. }
  13. void test()
  14. {
  15.         int a = 10;
  16.         int b = 0;
  17.         //第一步:把有可能出现异常的代码块放到try中
  18.         try
  19.         {
  20.                 func(a, b);
  21.                 cout << "func后的代码" << endl;
  22.         }
  23.         //第三步:接受一个int类型的异常
  24.         catch (int)
  25.         {
  26.                 cout << "接收到一个int类型的异常" << endl;
  27.         }
  28. }
  29. int main()
  30. {
  31.         test();
  32.         system("pause");
  33.         return 0;
  34. }
复制代码
四.非常的上风

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. class Maker
  5. {
  6. public:
  7.         void printMaker()
  8.         {
  9.                 cout << "除数不能为0" << endl;
  10.         }
  11. };
  12. int func(int a, int b)
  13. {
  14.         if (b == 0)
  15.         {
  16.                 //Maker m;
  17.                 //throw m; //抛出一个Maker类型的异常
  18.                 throw 20.22; //抛出一个double类型的异常
  19.         }
  20.         return a / b;
  21. }
  22. void test()
  23. {
  24.         int a = 10;
  25.         int b = 0;
  26.         try
  27.         {
  28.                 func(a, b);
  29.         }
  30.         catch (int)
  31.         {
  32.                 cout << "接收到一个int类型的异常" << endl;
  33.         }
  34.         catch (Maker maker)
  35.         {
  36.                 cout << "接收到一个Maker类型的异常" << endl;
  37.                 maker.printMaker();
  38.         }
  39.         catch (double)
  40.         {
  41.                 //如果不想处理异常,可以往上抛出,抛给调用本函数的函数
  42.                 throw;
  43.         }
  44. }
  45. int main()
  46. {
  47.         try
  48.         {
  49.                 test();
  50.         }
  51.         catch (double)
  52.         {
  53.                 cout << "接收一个double类型的异常" << endl;
  54.         }
  55.         system("pause");
  56.         return 0;
  57. }
复制代码
  

  • 用户可以忽略返回值,但不能忽略非常,假如忽略将会报错
  • 返回值只能返回一条信息,但对象有成员函数,可以包含多个信息
  • 可以逐层依赖处理非常
  五.非常的严格类型匹配

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. class Maker
  5. {
  6. public:
  7.        
  8. };
  9. int func(int a, int b)
  10. {
  11.         if (b == 0)
  12.         {
  13.                 //Maker m;
  14.                 //throw m; //抛出一个Maker类型的异常
  15.                 //throw 20.22; //抛出一个double类型的异常
  16.                 //throw 'c'; //抛出一个char类型的异常
  17.                 throw 20.0f; //抛出一个float类型的异常
  18.         }
  19. }
  20. void test()
  21. {
  22.         int a = 10;
  23.         int b = 0;
  24.         try
  25.         {
  26.                 func(a, b);
  27.         }
  28.         catch (Maker)
  29.         {
  30.                 cout << "接受一个Maker类型的异常" << endl;
  31.         }
  32.         catch (double)
  33.         {
  34.                 cout << "接受一个double类型的异常" << endl;
  35.         }
  36.         catch (char)
  37.         {
  38.                 cout << "接受一个char类型的异常" << endl;
  39.         }
  40.         catch (...) //接受其他类型的异常
  41.         {
  42.                 cout << "接受一个其他类型的异常" << endl;
  43.         }
  44. }
  45. int main()
  46. {
  47.         test();
  48.         system("pause");
  49.         return 0;
  50. }
复制代码
六.非常的接口声明

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. void func() throw(int, char) //只允许抛出int或者char异常
  5. {
  6.         throw 10; //抛出一个double类型的异常,Qt上程序会阻挡
  7. }
  8. int main()
  9. {
  10.         try
  11.         {
  12.                 func();
  13.         }
  14.         catch (int)
  15.         {
  16.                 cout << "int" << endl;
  17.         }
  18.         catch (...)
  19.         {
  20.                 cout << "..." << endl;
  21.         }
  22.         system("pause");
  23.         return 0;
  24. }
复制代码
七.栈解旋

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. class Maker
  5. {
  6. public:
  7.         Maker()
  8.         {
  9.                 cout << "Maker的构造" << endl;
  10.         }
  11.         Maker(const Maker &m)
  12.         {
  13.                 cout << "Maker的拷贝构造" << endl;
  14.         }
  15.         ~Maker()
  16.         {
  17.                 cout << "Maker的析构" << endl;
  18.         }
  19. };
  20. void func()
  21. {
  22.         //栈解旋:
  23.         //在抛出异常的函数中,如果抛出异常之后,但函数没有结束,此时栈上申请的对象都会被释放
  24.         Maker m;
  25.         throw m; //这个m是Maker m拷贝的一份
  26.         cout << "func函数结束" << endl;
  27. }
  28. void test()
  29. {
  30.         try
  31.         {
  32.                 func();
  33.                 cout << "func代码后" << endl;
  34.         }
  35.         catch (Maker)
  36.         {
  37.                 cout << "接收一个Maker类型的异常" << endl;
  38.         }
  39. }
  40. int main()
  41. {
  42.         test();
  43.         system("pause");
  44.         return 0;
  45. }
复制代码
八.非常变量的生命周期

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. class Maker
  5. {
  6. public:
  7.         Maker()
  8.         {
  9.                 cout << "Maker的构造" << endl;
  10.         }
  11.         Maker(const Maker &m)
  12.         {
  13.                 cout << "Maker的拷贝构造" << endl;
  14.         }
  15.         ~Maker()
  16.         {
  17.                 cout << "Maker的析构" << endl;
  18.         }
  19. };
  20. //产生三个对象
  21. void func1()
  22. {
  23.         Maker m; //第一个对象,在异常接收前被释放
  24.         throw m; //第二个对象,是第一个对象拷贝过来的
  25. }
  26. void test1()
  27. {
  28.         try
  29.         {
  30.                 func1();
  31.         }
  32.         catch (Maker m1) //第三个对象,是第二个对象拷贝过来的
  33.         {
  34.                 cout << "接收一个Maker类型的异常" << endl;
  35.                 //第二个对象和第三个对象在catch结束时释放
  36.         }
  37. }
  38. //产生两个对象
  39. void func2()
  40. {
  41.         throw Maker(); //第一个对象,匿名对象
  42. }
  43. void test2()
  44. {
  45.         try
  46.         {
  47.                 func2();
  48.         }
  49.         catch (Maker m1) //第二个对象,是第一个对象拷贝过来的
  50.         {
  51.                 cout << "接收一个Maker类型的异常" << endl;
  52.                 //第一个对象和第二个对象在catch结束时释放
  53.         }
  54. }
  55. //产生一个对象(常用)
  56. void func3()
  57. {
  58.         throw Maker(); //匿名对象
  59. }
  60. void test3()
  61. {
  62.         try
  63.         {
  64.                 func3();
  65.         }
  66.         catch (Maker &m1) //引用匿名对象
  67.         {
  68.                 cout << "接收一个Maker类型的异常" << endl;
  69.         }
  70. }
  71. //注意:
  72. void func4()
  73. {
  74.         //编译器不允许对栈中的匿名对象取地址操作
  75.         //throw Maker(); //err
  76.         //编译器允许对堆区中的匿名对象取地址操作
  77.         throw new Maker();
  78. }
  79. void test4()
  80. {
  81.         try
  82.         {
  83.                 func4();
  84.         }
  85.         catch (Maker* m1) //对匿名对象取地址
  86.         {
  87.                 cout << "接收一个Maker类型的异常" << endl;
  88.                 delete m1;
  89.         }
  90. }
  91. int main()
  92. {
  93.         test1();
  94.         test2();
  95.         test3();
  96.         test4();
  97.         system("pause");
  98.         return 0;
  99. }
复制代码
九.非常的多态

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. //异常的基类
  5. class Father
  6. {
  7. public:
  8.         virtual void printM()
  9.         {
  10.         }
  11. };
  12. //1.有继承
  13. class SonNULL :public Father
  14. {
  15. public:
  16.         virtual void printM() //2.重写父类的虚函数
  17.         {
  18.                 cout << "空指针异常" << endl;
  19.         }
  20. };
  21. class SonOut :public Father
  22. {
  23. public:
  24.         virtual void printM()
  25.         {
  26.                 cout << "越位溢出" << endl;
  27.         }
  28. };
  29. void func(int a, int b)
  30. {
  31.         if (a==0)
  32.         {
  33.                 throw SonNULL();
  34.         }
  35.         if (b==0)
  36.         {
  37.                 throw SonOut();
  38.         }
  39. }
  40. void test()
  41. {
  42.         int a = 0;
  43.         int b = 10;
  44.         try
  45.         {
  46.                 func(a, b);
  47.         }
  48.         catch (Father &f) //3.父类引用指向子类对象
  49.         {
  50.                 f.printM();
  51.         }
  52. }
  53. int main()
  54. {
  55.         test();
  56.         system("pause");
  57.         return 0;
  58. }
复制代码
十.体系提供的尺度非常

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. #include <string>
  4. #include <stdexcept> //标准异常库(Vs2013可以不需要写)
  5. using namespace std;
  6. //1.系统的标准异常类
  7. class Maker1
  8. {
  9. public:
  10.         Maker1(int age)
  11.         {
  12.                 if (age<0||age>150)
  13.                 {
  14.                         throw out_of_range("系统的标准异常类:年龄不在范围内");
  15.                 }
  16.                 else
  17.                 {
  18.                         this->age = age;
  19.                 }
  20.         }
  21. public:
  22.         int age;
  23. };
  24. void test1()
  25. {
  26.         try
  27.         {
  28.                 Maker1 m(200);
  29.         }
  30.         catch (out_of_range &ex)
  31.         {
  32.                 cout << ex.what() << endl;
  33.         }
  34. }
  35. //2.自己编写的异常类
  36. class MyOut_of :public exception
  37. {
  38. public:
  39.         MyOut_of(const char* errorinfo)
  40.         {
  41.                 //const char*转换string
  42.                 this->m_Info = string(errorinfo);
  43.         }
  44.         MyOut_of(const string errorinfo)
  45.         {
  46.                 this->m_Info = errorinfo;
  47.         }
  48.         const char* what() const
  49.         {
  50.                 //把string转换成const char*
  51.                 return this->m_Info.c_str();
  52.         }
  53. public:
  54.         string m_Info;
  55. };
  56. class Maker2
  57. {
  58. public:
  59.         Maker2(int age)
  60.         {
  61.                 if (age<0 || age>150)
  62.                 {
  63.                         throw MyOut_of("自己编写的异常类:年龄不在范围内");
  64.                 }
  65.                 else
  66.                 {
  67.                         this->age = age;
  68.                 }
  69.         }
  70. public:
  71.         int age;
  72. };
  73. void test2()
  74. {
  75.         try
  76.         {
  77.                 Maker2(200);
  78.         }
  79.         catch (MyOut_of &ex)
  80.         {
  81.                 cout << ex.what() << endl;
  82.         }
  83. }
  84. int main()
  85. {
  86.         test1();
  87.         test2();
  88.         system("pause");
  89.         return 0;
  90. }
复制代码

Unit 11:IO

   流的概念和堕泪库的结构
  

  • 尺度IO:对体系的尺度输入输出装备进行读写
  • 文件IO:对磁盘进行输入输出读写
  • 串IO:对内存进行读写
  一.体系尺度的输入流

   成员函数:
  

  • cin.get() //一次只能读取一个字符
  • cin.get(一个参数) //读取一个字符
  • cin.get(两个参数) //可以读取字符串
  • cin.getline() //取一行,换行符丢弃
  • cin.ignore() //忽略
  • cin.peek() //偷窥
  • cin.putback() //放回
  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. //单个输入
  5. void test1()
  6. {
  7.         //输入ab
  8.         char c = cin.get(); //读取a
  9.         cout << c << endl;
  10.         c = cin.get(); //读取b
  11.         cout << c << endl;
  12.         c = cin.get(); //读取换行符
  13.         cout << c << endl;
  14.         //其他形式
  15.         cin.get(c); //阻塞
  16.         cout << c << endl;
  17.         cin.get(c); //读取换行符
  18.         cout << c << endl;
  19.         char ch1, ch2, ch3, ch4;
  20.         cin.get(ch1).get(ch2).get(ch3).get(ch4);
  21.         cout << ch1 << ch2 << ch3 << ch4 << endl;
  22. }
  23. //按行输入
  24. void test2()
  25. {
  26.         char buf[1024] = { 0 };
  27.         cin.get(buf, 1024); //读取缓冲区时,换行符不拿走
  28.         char c = cin.get();
  29.         if (c=='\n')
  30.         {
  31.                 cout << "换行符还在缓冲区中" << endl;
  32.         }
  33.         cout << buf << endl;
  34.         cin.getline(buf, 1024); //读取缓冲区时,换行符丢弃
  35.         char ch = cin.get(); //阻塞
  36.         if (ch == '/n')
  37.         {
  38.                 cout << "换行符还在缓冲区中" << endl;
  39.         }
  40.         cout << buf << endl;
  41. }
  42. //忽略(参数为N,表示忽略N个字符)
  43. void test3()
  44. {
  45.         输入ab
  46.         //cin.ignore(); //默认忽略缓冲区内第一个字符
  47.         //char c = cin.get(); //b
  48.         //cout << c << endl;
  49.         //输入abcde
  50.         cin.ignore(3); //忽略缓冲区内前三个字符
  51.         char ch = cin.get(); //d
  52.         cout << ch<< endl;
  53. }
  54. //偷窥(只看不拿)
  55. void test4()
  56. {
  57.         //输入a
  58.         char c = cin.peek(); //偷窥第一个字符a
  59.         cout << "c:" << c << endl;
  60.         char ch = cin.get(); //拿走a
  61.         cout << "ch:" << ch << endl;
  62. }
  63. //返回(拿走后,放回去)
  64. void test5()
  65. {
  66.         //输入a
  67.         char c = cin.get(); //拿走a
  68.         cout << c << endl;
  69.         cin.putback(c); //放回a
  70.         char buf[1024] = { 0 };
  71.         cin.getline(buf, 1024); //拿走放回的a
  72.         cout << buf << endl;
  73. }
  74. //综合案例一:判断用户输入的是字符串还是数字
  75. void test6()
  76. {
  77.         cout << "请输入一个字符串或数字:" << endl;
  78.         char c = cin.peek();
  79.         if (c >= '0' && c <= '9')
  80.         {
  81.                 int num;
  82.                 cin >> num;
  83.                 cout << "输入的数字是:" << num << endl;
  84.         }
  85.         else
  86.         {
  87.                 char buf[1024] = { 0 };
  88.                 cin >> buf;
  89.                 cout << "输入的字符串是:" << buf << endl;
  90.         }
  91. }
  92. //综合案例二:输入0~10的数字,直到输入正确为止
  93. void test7()
  94. {
  95.         int num;
  96.         while (1)
  97.         {
  98.                 cin >> num;
  99.                 if (num >= 0 && num <= 10)
  100.                 {
  101.                         cout << "输入正确!!!" << endl;
  102.                         break;
  103.                 }
  104.                 cout << "重新输入:" << endl;
  105.                 //重置标志位
  106.                 cin.clear();
  107.                
  108.                 //拿走缓冲区内容
  109.                 char buf[1024] = { 0 };
  110.                 cin.getline(buf, 1024);
  111.                 //打印标志位
  112.                 //0表示正常,无数据
  113.                 //1表示不正常,有数据
  114.                 cout << cin.fail() << endl;
  115.         }
  116. }
  117. int main()
  118. {
  119.         //test1();
  120.         //test2();
  121.         //test3();
  122.         //test4();
  123.         //test5();
  124.         //test6();
  125.         test7();
  126.         system("pause");
  127.         return 0;
  128. }
复制代码
二.体系尺度的输出流




  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. //单个输出
  5. void test1()
  6. {
  7.         cout.put('c');
  8.         //链式编程
  9.         cout.put('a').put('b').put('c');
  10. }
  11. //按行输出
  12. void test2()
  13. {
  14.         char buf[] = "Hello World";
  15.         cout.write(buf, strlen(buf));
  16. }
  17. //通过流成员函数实现格式化的输出
  18. void test3()
  19. {
  20.         int num = 99;
  21.         //设置宽度
  22.         cout.width(20);
  23.         //填充
  24.         cout.fill('*');
  25.         //让数据在左边
  26.         cout.setf(ios::left);
  27.         //卸载十进制
  28.         cout.unsetf(ios::dec);
  29.         //安装十六进制
  30.         cout.setf(ios::hex);
  31.         //显示基数
  32.         cout.setf(ios::showbase);
  33.         //卸载十六进制
  34.         cout.unsetf(ios::hex);
  35.         //安装八进制
  36.         cout.setf(ios::oct);
  37.         cout << num << endl;
  38. }
  39. //通过控制符格式化输出(引入头文件iomanip)
  40. #include <iomanip>
  41. void test4()
  42. {
  43.         int num = 99;
  44.         //设置宽度
  45.         cout << setw(20);
  46.         //填充
  47.         cout << setfill('~');
  48.         //显示基数
  49.         cout << setiosflags(ios::showbase);
  50.         //让数据在左边
  51.         cout << setiosflags(ios::left);
  52.         //十六进制
  53.         cout << hex;
  54.         //八进制
  55.         cout << oct;
  56.         //十进制
  57.         cout << dec;
  58.         cout << num << endl;
  59. }
  60. //打印浮点数后面的小数点
  61. void test5()
  62. {
  63.         double d = 20.22;
  64.         //设置显示浮点数
  65.         cout << setiosflags(ios::fixed);
  66.         //显示小数点后10位
  67.         cout << setprecision(10) << endl;
  68.         cout << d << endl;
  69. }
  70. int main()
  71. {
  72.         //test1();
  73.         //test2();
  74.         //test3();
  75.         //test4();
  76.         test5();
  77.         system("pause");
  78.         return 0;
  79. }
复制代码
三.文件读写操作


C++文件读写:
  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. using namespace std;
  4. //1.引入头文件
  5. #include <fstream>
  6. //把程序中的信息输出到缓冲区,然后写到文件(写文件)
  7. void test1()
  8. {
  9.         //2.定义流对象
  10.         ofstream ofs;
  11.         //3.打开文件,以写的方式打开(如果没有文件,就创建)
  12.         ofs.open("test.txt", ios::out | ios::trunc);
  13.         //4.判断是否打开成功
  14.         if (!ofs.is_open())
  15.         {
  16.                 cout << "打开文件" << endl;
  17.         }
  18.         //5.写信息
  19.         ofs << "姓名:悟空" << endl;
  20.         ofs << "年龄:18" << endl;
  21.         ofs << "身高:180cm" << endl;
  22.         //6.关闭文件
  23.         ofs.close(); //关闭文件,并刷新缓冲区
  24. }
  25. //把磁盘信息输入到缓冲区,然后读到程序中(读文件)
  26. void test2()
  27. {
  28.         ifstream ifs;
  29.         ifs.open("test.txt", ios::in);
  30.         if (ifs.is_open()==false)
  31.         {
  32.                 cout << "打开失败" << endl;
  33.         }
  34.         //第一种方式读取文件
  35.         //一行一行读取
  36.         /*char buf[1024] = { 0 };
  37.         while (ifs >> buf)
  38.         {
  39.                 cout << buf << endl;
  40.         }*/
  41.         //第二种方式读文件
  42.         /*char buf[1024] = { 0 };
  43.         while (!ifs.eof()) //判断是否读到文件尾部
  44.         {
  45.                 ifs.getline(buf, sizeof(buf));
  46.                 cout << buf << endl;
  47.         }*/
  48.         //第三种方式读取文件
  49.         //单个字符读取
  50.         char c;
  51.         while ((c=ifs.get())!=EOF)
  52.         {
  53.                 cout << c;
  54.         }
  55.         ifs.close();
  56. }
  57. int main()
  58. {
  59.         //test1();
  60.         test2();
  61.         system("pause");
  62.         return 0;
  63. }
复制代码
四.二进制文件读写

  1. #define _CRT_SECIRE_NO_WARNINGS
  2. #include <iostream>
  3. #include <fstream>
  4. using namespace std;
  5. class Maker
  6. {
  7. public:
  8.         Maker()
  9.         {
  10.         }
  11.         Maker(const char* name, int age)
  12.         {
  13.                 this->age = age;
  14.                 strcpy(this->name, name);
  15.         }
  16. public:
  17.         char name[64];
  18.         int age;
  19. };
  20. //写文件
  21. void test1()
  22. {
  23.         Maker m1("悟空", 18);
  24.         Maker m2("贝吉塔", 22);
  25.         ofstream ofs;
  26.         ofs.open("test.txt", ios::out | ios::trunc | ios::binary);
  27.         if (!ofs.is_open())
  28.         {
  29.                 cout << "打开失败" << endl;
  30.         }
  31.         //写
  32.         ofs.write((const char *)&m1, sizeof(Maker));
  33.         ofs.write((const char *)&m2, sizeof(Maker));
  34.         ofs.close();
  35. }
  36. //读文件
  37. void test2()
  38. {
  39.         ifstream ifs;
  40.         ifs.open("test.txt", ios::in | ios::binary);
  41.         if (!ifs.is_open())
  42.         {
  43.                 cout << "打开失败" << endl;
  44.         }
  45.         //读
  46.         Maker m1;
  47.         Maker m2;
  48.         ifs.read((char*)&m1, sizeof(Maker));
  49.         ifs.read((char*)&m2, sizeof(Maker));
  50.         cout << "Name:" << m1.name << " Age:" << m1.age << endl;
  51.         cout << "Name:" << m2.name << " Age:" << m2.age << endl;
  52.         ifs.close();
  53. }
  54. //注意:当文件读写时,类中的成员变量不要有string类型
  55. class Maker2
  56. {
  57. public:
  58.         Maker2()
  59.         {
  60.         }
  61.         Maker2(string name, int age)
  62.         {
  63.                 this->name = name;
  64.                 this->age = age;
  65.         }
  66. public:
  67.         string name;
  68.         //string类中有一个成员指针char*,该指针指向存储字符串的空间
  69.         //当我们把string类的数据存储到文件中,再读出来时,不能保证指针有效
  70.         //string 开辟的空间如果大于16个字节就在堆区,小于就在栈区
  71.         int age;
  72. };
  73. int main()
  74. {
  75.         test1();
  76.         test2();
  77.         system("pause");
  78.         return 0;
  79. }
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

钜形不锈钢水箱

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表