<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>masa_cbl</author_name>
  <author_url>https://blog.hatena.ne.jp/masa_cbl/</author_url>
  <blog_title>生物物理計算化学者の雛</blog_title>
  <blog_url>https://masa-cbl.hatenadiary.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>Ｃ言語でテキストファイルに書き込まれているデータを読み込むプログラムの例をいくつか記述しておきます。fscanf()関数を使うと楽に記述できるケースもありますが、思い通りに fscanf() が動作してくれないことがありますので、ファイルから１行ずつ文字列配列 char line[] に読み込んでから、データに変換するという手順で実装しています。 atoi() とatof() 関数 &quot;123&quot;, &quot;1.234&quot; のように文字列として読み込んだデータはatoi(), atof()関数によりint型、double型に変換することができます。なお、文字列の先頭に &quot; 123&quot; のようにスペースが入っ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmasa-cbl.hatenadiary.jp%2Fentry%2F20130407%2F1365346150&quot; title=&quot;C言語でいろいろなフォーマットのテキストファイルを読むプログラム例 - 生物物理計算化学者の雛&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>2013-04-07 23:49:10</published>
  <title>C言語でいろいろなフォーマットのテキストファイルを読むプログラム例</title>
  <type>rich</type>
  <url>https://masa-cbl.hatenadiary.jp/entry/20130407/1365346150</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
