setw(10) 设置宽度为10

输出流:

      比如 cout<<2<<setw(10)<<3<<setw(10)<<4;  则显示2         3         4

       cout<<hex<<16<<endl;   按16进制输出

        cout<<oct<<16<<endl;按八进制输出

输入流: cin

标准库   string 类型    string str1;   

                                 int Size=str1.size();

                                 str1[n];     // 0<n<=size()-1

                                    c++ 标准输入输出流

                                             c++ 标准输入输出流

相关文章:

  • 2022-12-23
  • 2021-08-22
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
猜你喜欢
  • 2021-05-25
  • 2021-10-17
  • 2021-05-10
  • 2021-11-30
  • 2021-06-01
  • 2021-09-22
  • 2022-12-23
相关资源
相似解决方案