search

Home  >  Q&A  >  body text

C++中的"%:"和"%:%:"如何使用?

可能这是C++11的内容,但是不明白用法 像G++中可以用""代替"}","<:"代替"[",":>"代替"]" 经过测试,微软的编译器中并未实现这个语法 "%:"和"%:%:"的出处是 http://www.externsoft.ch/media/swf/cpp11-iso.html#preprocessing_op_or_punc

迷茫迷茫2803 days ago1702

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:12:22

    The keyboards we use are all standard American keyboards. However, in some countries, many keyboard layouts do not have {, so you can use <% instead of {.

    §6.4.6-3 (C99)

    In all aspects of the language, the six tokens

    <: :> %: %:%:

    behave, respectively, the same as the six tokens

    [ ] { } # ##

    So:

    • %: is #
    • %:%: Just ##

    Download ISOIEC 9899-201x-C language standard specification.pdf

    reply
    0
  • Cancelreply