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

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

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

      1. C ++中字符串文字的类型是什么?

        What is the type of a string literal in C++?(C ++中字符串文字的类型是什么?)
        <legend id='Ha6ws'><style id='Ha6ws'><dir id='Ha6ws'><q id='Ha6ws'></q></dir></style></legend>

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

            1. <tfoot id='Ha6ws'></tfoot>

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

                <tbody id='Ha6ws'></tbody>
                  <bdo id='Ha6ws'></bdo><ul id='Ha6ws'></ul>
                  本文介绍了C ++中字符串文字的类型是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  例如,字符串文字Hello"的类型是什么,const char[6]const char* ?

                  For example, what is the type of the string literal "Hello", const char[6] or const char* ?

                  推荐答案

                  字符串字面量 "Hello" 的类型是 "6 const char 的数组".

                  The type of the string literal "Hello" is "array of 6 const char".

                  普通字符串文字和 UTF-8 字符串文字也称为窄字符串文字.窄字符串文字的类型为数组 n const char",其中 n 是字符串的大小 [...]

                  Ordinary string literals and UTF-8 string literals are also referred to as narrow string literals. A narrow string literal has type "array of n const char", where n is the size of the string [...]

                  但是,它可以通过数组到指针的转换转换为 const char*.数组到指针的转换导致指向数组第一个元素的指针.

                  It can, however, be converted to a const char* by array-to-pointer conversion. Array-to-pointer conversion results in a pointer to the first element of the array.

                  这篇关于C ++中字符串文字的类型是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)
                    1. <tfoot id='UL8B1'></tfoot>
                        <bdo id='UL8B1'></bdo><ul id='UL8B1'></ul>
                          <tbody id='UL8B1'></tbody>

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

                        • <small id='UL8B1'></small><noframes id='UL8B1'>

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