log.h
namespace stuff {
class log {
..........
friend std::wostream& operator<<( std::wostream& oss, const log& error );
};
}
log.cpp
std::wostream& stuff::operator<<( std::wostream& oss, const stuff::log& error )
{
oss << log.m_message; // log.m_message is a std::wstring
return oss;
}
1>c:\users\oso\documents\visual studio 2010\projects\moduleinjector\moduleinjector\cdllinjection.cpp(147): error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const std::wstring' (or there is no acceptable conversion)
Any idea what im doing wrong?