#include<iostream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include<fstream>
#include<string>
using namespace std;
int countLines(ifstream& in )
{
int count = 0;
char line[80];
if (in.good())
{
//while (!feof(in))
while(getline(in,line)) count++;
in.seekg(ios::beg);
}
return count;
}
沒有匹配的調用函數獲取線 這是什麼意思? 我已經包含了所有的標題,但爲什麼我仍然無法調用get line?Getline error undefined
的文檔查找一個'的std :: getline'參考,並尋找示例代碼和參數。將參數類型與您的參數類型進行比較,並使用示例進行幫助。 – chris