// C10_11.cpp : Defines the entry point for the console application. // 利用 getline() 函式開啟檔案內容 #include "stdafx.h" #include #include int main(int argc, char* argv[]) { ifstream File1; char Record[100]; File1.open("File1.txt"); if(!File1.is_open()) { cout << "開啟檔案失敗!" << endl; } else { for(int i=0;i<=10;i++) { if(File1.fail()) cout<< "列: " << i << " 無法發現!" <