正在加载图片...
bool open Fileln(fstream &file, char namel d t file open(name, ios: in) return file fail(? false: true; void show Contents(fstream &file) t char name811 while(! file eof()) i file >>name if(file. fail) breaks cout < name < 2-8.cppbool openFileIn(fstream &file, char name[ ]) { file.open(name, ios::in); return file.fail( )? false:true; } void showContents(fstream &file) { char name [81]; while( !file.eof( )) { file >> name ; if(file.fail( )) break; cout << name << " " ; } } 2-8.cpp
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有