<tfoot id='US1zP'></tfoot>
        <bdo id='US1zP'></bdo><ul id='US1zP'></ul>

      <legend id='US1zP'><style id='US1zP'><dir id='US1zP'><q id='US1zP'></q></dir></style></legend>

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

        <i id='US1zP'><tr id='US1zP'><dt id='US1zP'><q id='US1zP'><span id='US1zP'><b id='US1zP'><form id='US1zP'><ins id='US1zP'></ins><ul id='US1zP'></ul><sub id='US1zP'></sub></form><legend id='US1zP'></legend><bdo id='US1zP'><pre id='US1zP'><center id='US1zP'></center></pre></bdo></b><th id='US1zP'></th></span></q></dt></tr></i><div id='US1zP'><tfoot id='US1zP'></tfoot><dl id='US1zP'><fieldset id='US1zP'></fieldset></dl></div>

      1. 向量<无符号字符>vs 二进制数据的字符串

        时间:2023-09-15

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

        • <tfoot id='mBP3T'></tfoot>

            <legend id='mBP3T'><style id='mBP3T'><dir id='mBP3T'><q id='mBP3T'></q></dir></style></legend>

            • <i id='mBP3T'><tr id='mBP3T'><dt id='mBP3T'><q id='mBP3T'><span id='mBP3T'><b id='mBP3T'><form id='mBP3T'><ins id='mBP3T'></ins><ul id='mBP3T'></ul><sub id='mBP3T'></sub></form><legend id='mBP3T'></legend><bdo id='mBP3T'><pre id='mBP3T'><center id='mBP3T'></center></pre></bdo></b><th id='mBP3T'></th></span></q></dt></tr></i><div id='mBP3T'><tfoot id='mBP3T'></tfoot><dl id='mBP3T'><fieldset id='mBP3T'></fieldset></dl></div>
              • <bdo id='mBP3T'></bdo><ul id='mBP3T'></ul>

                    <tbody id='mBP3T'></tbody>
                  本文介绍了向量<无符号字符>vs 二进制数据的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  哪个是用于保存和访问二进制数据的更好的 C++ 容器?

                  Which is a better c++ container for holding and accessing binary data?

                  std::vector<unsigned char>
                  

                  std::string
                  

                  一种比另一种更有效吗?
                  一种更正确"的用法吗?

                  Is one more efficient than the other?
                  Is one a more 'correct' usage?

                  推荐答案

                  您应该更喜欢 std::vectorstd::string 之上.通常情况下,这两种解决方案几乎是等效的,但是 std::string 是专门为字符串和字符串操作而设计的,这不是您的预期用途.

                  You should prefer std::vector over std::string. In common cases both solutions can be almost equivalent, but std::strings are designed specifically for strings and string manipulation and that is not your intended use.

                  这篇关于向量<无符号字符>vs 二进制数据的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用布尔值向量是否比动态位集慢? 下一篇:push_back 是如何在 STL 向量中实现的?

                  相关文章

                  最新文章

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

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