title: How can I refer to the function in structure of class in C++?
body: <p>I'd like to use the getSth function which returns <code>struct aa</code> type in <code>main()</code>.
  Would you let me know the way to refer it?</p>
  
  <pre><code>//info.h
  namespace nsp {
    class A {
      struct Info {
        struct aa {
          std::string str;
          int num;
          aa(): num(0) {}
        };
        std::vector&lt;aa&gt; aas;
        aa getSth();
      };
    };
  }
  
  //info.cpp
  A::Info::aa A::Info::getSth() {
  aa ret;
  for(auto &amp;tmp: aas) {
    if(ret.num &lt; aas.num)
      ret.num = aas.num;
  }
  return ret;
  }
  
  // main.cpp
  #include info.h
  namepace nsp {
    class A;
  }
  int main()
  {
    nsp::A *instance = new nsp::A();
    // How can I refer getSth using "instance"?
    .....
    return 0;
  }
  </code></pre>