Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:cpp:fileiostream [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:cpp:fileiostream

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
ja:cpp:fileiostream [2015/02/26 14:47]
kota [読み込み]
ja:cpp:fileiostream [2015/02/26 14:48] (現在)
kota [読み込み]
ライン 9: ライン 9:
 ==== 読み込み ==== ==== 読み込み ====
  
-''​ +<code c> 
- +FILE *fp; 
-FILE *fp;\\ +fp = fopen("​filename.txt",​ "​r"​ ); 
-fp = fopen("​filename.txt",​ "​r"​ );\\ +  if( fp == NULL ){ 
-  if( fp == NULL ){\\ +    printf("​File do not exist.\n"​);​ 
-    printf("​File do not exist.\n"​);​\\ +    return -1; 
-    return -1;\\ +  }
-  }\\+
 fclose( fp ); fclose( fp );
  
-''​+</​code>​
 ==== 書き込み ==== ==== 書き込み ====
 ---- ----
 ===== ifstream, ofstreamを使う ===== ===== ifstream, ofstreamを使う =====
ja/cpp/fileiostream.1424962051.txt.gz · 最終更新: 2015/02/26 14:47 by kota