Write your question here.
So, i got the name to come out but im having problem with phone number to display! for example: in the file i have......i tried add inputFile >> num but it have - so it give me an error.
Depending on further uses in the program you can also consider setting up a struct:
1 2 3 4 5 6
struct Person
{
std::string m_fName;
std::string m_lName;
std::string m_pNum;
};
and then overload the extraction operator >> for Person to read into Person objects directly from file, store these objects in std::vector<Person>, do stuff with them, print Person objects directly by further overload of the stream insertion operator << etc