getline を使用してドキュメントを解析し、行全体を取得して「line」という名前の文字列変数に配置しようとしています。問題は、「オーバーロードされた関数 getline のインスタンスが引数リストと一致しません」というエラーが表示されることです。誰でもこの問題を解決するのを手伝ってもらえますか?
#include <iostream>
#include <fstream>
#include <string>
#include "recordsOffice.h"
using namespace std;
RecordsOffice::RecordsOffice()
{
}
void RecordsOffice::parseCommands (string commandsFileName)
{
//String to hold a line from the file
string line;
//Open the file
ifstream myFile;
myFile.open(commandsFileName);
// Check to make sure the file opened properly
if (!myFile.is_open())
{
cout << "There was an error opening " << commandsFileName << "." << endl;
return;
}
//Parse the document
while (getline(myFile, line, '/n'))
{
if (line[0] == 'A')
{
addStudent(line);
}