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++ 标准输入输出流

相关文章: