<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fa11enprince</author_name>
  <author_url>https://blog.hatena.ne.jp/fa11enprince/</author_url>
  <blog_title>Gobble up pudding</blog_title>
  <blog_url>https://gup.monster/</blog_url>
  <categories>
    <anon>Programming</anon>
    <anon>C++</anon>
  </categories>
  <description>C/C++を使っているとファイルを読んで、メモリ上にデータを格納したいときに メモリをどのくらい確保する必要があるか調べるのに行数を数えることが多いかと思います。 だいたいは以下の様なコードを書かれたことが多いのではないのでしょうか？ 私はよほどパフォーマンス上の問題がない限りC++流儀のものを使ったほうがいいと思いますが……。 下記は行数を調べてその分だけ配列を確保して文字列をメモリに読み込んでいるコードです。 100万行のテキストを読み込んでいます。 てかvector使え……うわなにをするやめ…くぁｗせｄｒｆｔｇｙふじこ ※補足 ただしこの方法はファイルフォーマットがガチガチに決まっていて…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgup.monster%2Fentry%2F2014%2F04%2F16%2F230132&quot; title=&quot;C/C++で行数を数えるときの注意とwcコマンド - Gobble up pudding&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>https://cdn-ak.f.st-hatena.com/images/fotolife/f/fa11enprince/20200701/20200701023257.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-04-16 23:01:32</published>
  <title>C/C++で行数を数えるときの注意とwcコマンド</title>
  <type>rich</type>
  <url>https://gup.monster/entry/2014/04/16/230132</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
