<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>asakawajunya</author_name>
  <author_url>https://blog.hatena.ne.jp/asakawajunya/</author_url>
  <blog_title>asakawajunyaのブログ</blog_title>
  <blog_url>https://asakawajunya.hatenablog.com/</blog_url>
  <categories>
    <anon>c++</anon>
    <anon>sample</anon>
    <anon>tips</anon>
  </categories>
  <description>引数で渡された参照に対して、文字列をセットして返す方法が自分の中でシックリこなかったので、簡単にまとめ。一つは文字列の参照を渡す方法で、もう一つはポインタのポインタを渡す方法。見た目的にもコード的にも参照で渡してセットする方が簡単かな。 サンプルコード #include &lt;iostream&gt; using namespace std; void hoge1 (char* &amp;buf) { buf = const_cast&lt;char*&gt;(&quot;hoge1&quot;); } void hoge2(char** buf) { *buf = const_cast&lt;char*&gt;(&quot;hoge2&quot;); } int main…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fasakawajunya.hatenablog.com%2Fentry%2F20111118%2F1321622001&quot; title=&quot; 値を引数にセットして返す方法 - asakawajunyaのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-11-18 22:13:21</published>
  <title> 値を引数にセットして返す方法</title>
  <type>rich</type>
  <url>https://asakawajunya.hatenablog.com/entry/20111118/1321622001</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
