So I have an array of names and I need to find the position of the blank and put anything that comes before it into fname and put everything that comes after the blank into lname. I have absolutely no idea what I'm doing and I got help from my teacher and she gave me the 3 lines of code that come after posit_of_blank, fname and lname and said that all I had to do was figure out what goes in place of the ... and I haven't got a clue.
using namespace std;
#include "PersonNameFileCreator.h"
#include "PersonName.h"
int main()
{
string arr_names[] = {"Adam Burke", "Madeline Kramer", "Scott Gardner",
"Tonya Lopez", "Christoper Hamilton",
"Andrew Mitchell", "Lori Smith" };
PersonNameFileCreator fil_names("names.txt);
for (auto one_name : arr_names)
{
int posit_of_blank = ?
string fname = ?
string lname = ?
PersonName onePerson(fname, lname);
fil_names.write_to_file(onePerson);
}
return 0;
}