void addinfo(string ls, string fl, double prft)
{
bool listFnd=false;
bool fillFnd=false;
if(emp.size()!=0)
{
for(int i=0; i<emp.size(); i++)
{
if (fl==emp[i].name)
{
fillFnd=true;
cout<<counter<<" fillfnd set to true for " <<emp[i].name<<" at index "<<i<<endl; //debugging
}
if(ls==emp[i].name)
{
listFnd=true;
cout<<counter<<" listfnd set to true for "<<emp[i].name<<" at index "<<i<<endl; //debugging
}
}
if(fillFnd==true)
{
cout<<counter<<" fillfnd STILL set to true"<<endl;
}
if(listFnd==true)
{
cout<<counter<<" listfnd STILL set to true"<<endl;
}
if(fillFnd==false)
{
employees addfiller;
addfiller.name=fl;
addfiller.lineAdded = counter;
cout<<" Adding Filler "<<addfiller.name<<" "<<counter<<endl; //debugging
emp.push_back(addfiller);
}
if(listFnd==false)
{
employees addlister;
addlister.name=ls;
addlister.lineAdded=counter;
cout<<"Adding Lister "<<addlister.name<<" "<<counter<<endl; //debugging
emp.push_back(addlister);
}
for(int w = 0; w<emp.size();w++)
{
if(ls==emp[w].name)
{
emp[w].lists+=prft;
}
if(fl==emp[w].name)
{
emp[w].fills++;
}
}
}
if(emp.size()==0)
{
employees first;
first.name = ls;
first.lists = prft;
first.lineAdded=counter;
if(ls==fl)
{
first.fills++;
}
if(ls!=fl)
{
employees next;
next.name=fl;
next.fills++;
next.lineAdded=counter;
emp.push_back(next);
}
emp.push_back(first);
}
}