compiler error c2678 – saying Any binary operator( <<, >>, ==, !=)as not defined even though they are present. Probable reason is Iam using VC 6 whereas the code is from earlier version of VC. MSDN help describes it as a namespace problem and suggests some workarounds. Heres the code snippet.
In someclass.h:
template
class Someclass
{
// class definition here
friend bool operator==(const
someclass
{}
}
In main.cpp:
struct aclass
{
aclass(char *r) {
if (r != NULL) {
std::istringstream str(r);
str >> range; }
}
someclass
friend operator==(const aclass &p1, const aclass &p2)
{
return 1;
}
}