文件输入示例 include <fstream. h> oid main () ifstream fin ( TEST. TxT)i char line [100]; char name [50] int age float salary fin >> line i fin name age > salary i cout < line < endli c。吐t<<name<<""<<age<<""<< salary<<end1; f close()i 北大青鸟10 文件输入示例 #include <fstream.h> void main () { ifstream fin ("TEST.TXT"); char line [100]; char name [50]; int age; float salary; fin >> line ; fin >> name >> age >> salary; cout << line << endl; cout << name << " " << age << " " << salary << endl; fin. close(); }