Hi,
I've tried, but I think the problem is with my function as well. The user inputs :
john doe but the file has doe, john and it might be in the 15th row or the 4th one. So the function has to find this name first. The other part would be easy for me, but can not get over this first part...
Thanks....
User Profile
Collapse
-
Here is what I've done so far. It does not find the matching name:( so I am stuck and can not go further...
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
void findname (string firstlast);
int main (){
ifstream in;
in.open ("phoneDir") ;
int...Leave a comment:
-
C++ parsing username from string
Hello Guys,
Yes, another beginner in C++ and I have a homework assignment that is giving me a headache.
Can someone help me with the following problem?
I have a text file with names, phone numbers and addresses.
I have to ask the user to input first name, last name then with a function call I have to find this name in my text file. The trick is that the name is in different format. Instead of first name, last name, it...
No activity results to display
Show More
Leave a comment: