<tfoot id='Q6r9h'></tfoot>
    1. <small id='Q6r9h'></small><noframes id='Q6r9h'>

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

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

    2. <i id='Q6r9h'><tr id='Q6r9h'><dt id='Q6r9h'><q id='Q6r9h'><span id='Q6r9h'><b id='Q6r9h'><form id='Q6r9h'><ins id='Q6r9h'></ins><ul id='Q6r9h'></ul><sub id='Q6r9h'></sub></form><legend id='Q6r9h'></legend><bdo id='Q6r9h'><pre id='Q6r9h'><center id='Q6r9h'></center></pre></bdo></b><th id='Q6r9h'></th></span></q></dt></tr></i><div id='Q6r9h'><tfoot id='Q6r9h'></tfoot><dl id='Q6r9h'><fieldset id='Q6r9h'></fieldset></dl></div>
      1. 你如何将结构模板标记为朋友?

        时间:2023-05-24
        <i id='e8M9a'><tr id='e8M9a'><dt id='e8M9a'><q id='e8M9a'><span id='e8M9a'><b id='e8M9a'><form id='e8M9a'><ins id='e8M9a'></ins><ul id='e8M9a'></ul><sub id='e8M9a'></sub></form><legend id='e8M9a'></legend><bdo id='e8M9a'><pre id='e8M9a'><center id='e8M9a'></center></pre></bdo></b><th id='e8M9a'></th></span></q></dt></tr></i><div id='e8M9a'><tfoot id='e8M9a'></tfoot><dl id='e8M9a'><fieldset id='e8M9a'></fieldset></dl></div>

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

        <tfoot id='e8M9a'></tfoot>

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

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

                  本文介绍了你如何将结构模板标记为朋友?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有这样的代码:

                  template <typename T, typename U> struct MyStruct {
                      T aType;
                      U anotherType;
                  };
                  
                  class IWantToBeFriendsWithMyStruct
                  {
                      friend struct MyStruct; //what is the correct syntax here ?
                  };
                  

                  为模板赋予友谊的正确语法是什么?

                  What is the correct syntax to give friendship to the template ?

                  推荐答案

                  class IWantToBeFriendsWithMyStruct
                  {
                      template <typename T, typename U>
                      friend struct MyStruct;
                  };
                  

                  在 VS2008 中工作,并允许 MyStruct 访问该类.

                  Works in VS2008, and allows MyStruct to access the class.

                  这篇关于你如何将结构模板标记为朋友?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:类模板中的模板构造函数 - 如何为第二个参数显 下一篇:“永久"标准::设置

                  相关文章

                  最新文章

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

                      <tfoot id='paW3p'></tfoot>
                      <legend id='paW3p'><style id='paW3p'><dir id='paW3p'><q id='paW3p'></q></dir></style></legend>
                    1. <small id='paW3p'></small><noframes id='paW3p'>

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