<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Einherjar</author_name>
  <author_url>https://blog.hatena.ne.jp/Einherjar/</author_url>
  <blog_title>ProsBloom</blog_title>
  <blog_url>https://einherjar.hatenadiary.org/</blog_url>
  <categories>
    <anon>プログラム</anon>
    <anon>C言語</anon>
  </categories>
  <description>mallocの戻り値の型はvoid*なのだけれどこれをキャストする人がいる。Cの入門的なサイトはWeb上にたくさんある。戻り値がvoid*なので格納するポインタの型にあわせてキャストしろっていうような解説が非常に多い。 C++ではキャストが必要だが、そもそもC++ではnewを使うべきじゃないの？それならコンパイルはソース単位だから関係なくてリンクだけの問題だよね。ソースにC/C++を混ぜるような変態チックなのはついて行けない。 ANSI-C以前のコンパイラではmallocの戻り値がchar*だったのでキャストが必要でした、とか言う解説も見たけど何でmallocだけ？関数のプロトタイプ宣言はAN…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Feinherjar.hatenadiary.org%2Fentry%2F20070822%2Fp1&quot; title=&quot; mallocの戻り値 - ProsBloom&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>2007-08-22 00:00:00</published>
  <title> mallocの戻り値</title>
  <type>rich</type>
  <url>https://einherjar.hatenadiary.org/entry/20070822/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
