<bdo id='2NYwH'></bdo><ul id='2NYwH'></ul>

    <tfoot id='2NYwH'></tfoot>
    <legend id='2NYwH'><style id='2NYwH'><dir id='2NYwH'><q id='2NYwH'></q></dir></style></legend>

  1. <i id='2NYwH'><tr id='2NYwH'><dt id='2NYwH'><q id='2NYwH'><span id='2NYwH'><b id='2NYwH'><form id='2NYwH'><ins id='2NYwH'></ins><ul id='2NYwH'></ul><sub id='2NYwH'></sub></form><legend id='2NYwH'></legend><bdo id='2NYwH'><pre id='2NYwH'><center id='2NYwH'></center></pre></bdo></b><th id='2NYwH'></th></span></q></dt></tr></i><div id='2NYwH'><tfoot id='2NYwH'></tfoot><dl id='2NYwH'><fieldset id='2NYwH'></fieldset></dl></div>
  2. <small id='2NYwH'></small><noframes id='2NYwH'>

      如何打印矢量的数据

      How to print vector#39;s data(如何打印矢量的数据)
        <i id='ZBiJG'><tr id='ZBiJG'><dt id='ZBiJG'><q id='ZBiJG'><span id='ZBiJG'><b id='ZBiJG'><form id='ZBiJG'><ins id='ZBiJG'></ins><ul id='ZBiJG'></ul><sub id='ZBiJG'></sub></form><legend id='ZBiJG'></legend><bdo id='ZBiJG'><pre id='ZBiJG'><center id='ZBiJG'></center></pre></bdo></b><th id='ZBiJG'></th></span></q></dt></tr></i><div id='ZBiJG'><tfoot id='ZBiJG'></tfoot><dl id='ZBiJG'><fieldset id='ZBiJG'></fieldset></dl></div>

        <small id='ZBiJG'></small><noframes id='ZBiJG'>

          <tbody id='ZBiJG'></tbody>
      • <legend id='ZBiJG'><style id='ZBiJG'><dir id='ZBiJG'><q id='ZBiJG'></q></dir></style></legend>
          <tfoot id='ZBiJG'></tfoot>

          • <bdo id='ZBiJG'></bdo><ul id='ZBiJG'></ul>

                本文介绍了如何打印矢量的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我在互联网上搜索了很多,但找不到打印矢量数据的简单示例..

                I've searched a lot over the internet, and couldent find simple examples to print vector's data..

                我试图像数组一样打印它,但它没有用...

                I tried to print it like an array, though it didnt worked...

                这是我尝试过的:

                using namespace std ;
                .....
                const int MAX = 255 ;
                
                vector <string> testersName[MAX];
                cout << testersName[i] << endl;
                

                错误仅在 cout 行中,第一行正在得到遵守,一切顺利..

                The error is only in the cout line, the first line is getting complied and everything goes well..

                我在 testersName 中得到了数据,但我收到了这个错误:

                I got data inside testersName, though Im getting this error :

                "错误 1 错误 C2679: 二进制 '<<': 没有找到使用std::vector<_Ty>"类型的右侧操作数的运算符(或者没有可接受的转换)"

                "Error 1 error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::vector<_Ty>' (or there is no acceptable conversion)"

                推荐答案

                vector testersName[MAX]; 声明了一个向量数组,尝试简单的 vector ;testersName(MAX); - 这声明了一个带有 MAX 元素的向量.

                vector <string> testersName[MAX]; declares an array of vectors, try simply vector <string> testersName(MAX); - this declares a vector with MAX elements.

                这篇关于如何打印矢量的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Visual C++ appends 0xCC (int3) bytes at the end of functions(Visual C++ 在函数末尾附加 0xCC (int3) 字节)
                How to use a variable inside a _T wrapper?(如何在 _T 包装器中使用变量?)
                MSVC++ warning flags(MSVC++ 警告标志)
                How to read file which contains uxxxx in vc++(如何在vc++中读取包含uxxxx的文件)
                stack overflow error in C++ program(C++程序中的堆栈溢出错误)
                std::unordered_map very high memory usage(std::unordered_map 非常高的内存使用率)

                  <bdo id='qhLcR'></bdo><ul id='qhLcR'></ul>

                  <small id='qhLcR'></small><noframes id='qhLcR'>

                  <i id='qhLcR'><tr id='qhLcR'><dt id='qhLcR'><q id='qhLcR'><span id='qhLcR'><b id='qhLcR'><form id='qhLcR'><ins id='qhLcR'></ins><ul id='qhLcR'></ul><sub id='qhLcR'></sub></form><legend id='qhLcR'></legend><bdo id='qhLcR'><pre id='qhLcR'><center id='qhLcR'></center></pre></bdo></b><th id='qhLcR'></th></span></q></dt></tr></i><div id='qhLcR'><tfoot id='qhLcR'></tfoot><dl id='qhLcR'><fieldset id='qhLcR'></fieldset></dl></div>
                    1. <legend id='qhLcR'><style id='qhLcR'><dir id='qhLcR'><q id='qhLcR'></q></dir></style></legend>
                        <tbody id='qhLcR'></tbody>

                          <tfoot id='qhLcR'></tfoot>