hey everyone, i believe i'm having a brain fart because i cant see whats wrong with this part of my code it compiles fine but it doesn't output the string when it should. its checking to see if there are duplicates of an found email. thanks for the help =).
bool emailAlreadyExists = false;
//stating point of the check
for (int i = 0; i < nEmails; i++)
{
string temp1=email[i];
//change to lower
class toLower {public: charoperator()(char c) const {return tolower(c);}};
transform(temp1.begin(), temp1.end(), temp1.begin(), toLower());
//check against others in the array
for (int j=i+1;j<=nEmails;j++)
{
//create temp2 code
string temp2=email[j];
//change to lower
transform(temp2.begin(), temp2.end(), temp2.begin(), toLower());
//if it is equal change to true
if (temp1 == temp2) emailAlreadyExists = true;
{
break;
}//if
}//for
// if non-duplicate,print to screen
if (!emailAlreadyExists)
{
cout<<email[i]<<";"<<endl;
}//if
}//while