Sorry, still a beginner to coding.
I have this included in the block of code.
#include <iostream>
#include <string>
#include <fstream>
Basically, I'm attempting to create a function that will store line by line, the data into a structure with 4 arrays of [200]. Here is my code,
struct AccountInfo {
string account[200];
int pin[200];
string name[200];
long double amount[200];
};
AccountInfo storeAccount(AccountInfo tabs[]) {
ifstream myfile;
myfile.open("AccountInfo.txt");
for (int i = 0; i < myfile.eof(); i++)
{
getline(myfile, tabs[i].account);
getline(myfile, tabs[i].pin);
getline(myfile, tabs[i].name);
getline(myfile, tabs[i].amount);
}
}
All my getline's have this error message "Severity Code Description Project File Line Suppression State Error (active) E0304 no instance of overloaded function "getline" matches the argument list"
If someone can help me out, that would be fantastic!