int file = open("test.txt", "r"); //読み込みモード「r」でファイルを開く int n = countln(file); //行数をカウント for(int i=0; i