Original Post
Can someone tell me why the following line of code won''t compile?
std::ofstream& CLogFile::endl (std::ofstream &out)
{
return out << "
";
}
The error states:
''return'' : cannot convert from ''class std::basic_ostreamIt seems to be complaining that I''m trying to convert an ostream to an ofstream, but as far as I can see I''m not.>'' t o ''class std::basic_ofstream > &'' A reference that is not to ''const'' cannot be bound to a non-lvalue