Hello,
I am trying to read text from a simple text file.
The text file contains a list of emails and zipcodes, formated as follows:
email@site.com;zipcode where zipcode is 5 integers.
I am having an issue with the getline function, my error is "no instance of overloaded function".
Could someone please help me with this? I would like my error explained if possible, not just fixed.
void createDatabase()
{
int zipcode;
member inputStream;
cout << "You have selected to create a database";
cout << "\n\nPlease enter the zipcode of the database to create: ";
cin >> zipcode;
ifstream inputFile;
inputFile.open("database.txt");
while(!inputFile.eofbit)
{
getline(inputFile, inputStream.email, ";");
cout << inputStream.email << endl;
getline(inputFile, inputStream.zip, \n);
cout << inputStream.zip << endl;
}
}