I have classes named and,or...and in main I need their members so I declared main as those classes friend,do you mean that kind of declaring main is wrong?
while (!input.eof())
{
getline(input,line);
help.push_back(line);
line.clear();
}
at line 3 (above), the getline is performed. But regardless of whether or not it was successful, the next two lines are executed - in particular the push_back() which may add an empty line to the vector.
A recommended way is to not use eof() at all.
1 2 3 4
while (getline(input,line))
{
help.push_back(line);
}