This is my function at the moment
long long int File::Getline3(int user1, long long int user3)
{
std::string filename = std::to_string(user1);
std::ifstream fin(filename + ".txt");
fin.getline (line1, 5);
fin.getline (line2, 5);
fin.getline (line3, 20);
fin.close();
user3 = (atoi(line3));
return user3;
}
Seems to return a most of the numbers, but not all, and in a jumbled up format.
Not sure if my error lies in reading the line (getline) or converting it (atoi) or returning it.
(line1, line2 and line3 char declared in header file)
Line 3 is 16 digits long.