Re[6]: наследование или...
От: Oleg A. Bachin Украина  
Дата: 10.08.04 11:55
Оценка:
Здравствуйте, Glоbus, Вы писали:

прошу прощения на все эти непонятки. на самом деле, оказалась проблема в другом:

#include <iostream>
int main()
{
    std::string str1("str1");
    std::string str2("str2");

    std::cout << (str1 == str2) << std::endl;
}


cl /EHsc /TP test2.cpp

test2.cpp
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::allocator<_Ty> &,const std::allocator<_Other> &)' : could not deduce template argument for 'const std::allocator<_Ty> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xmemory(165) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::allocator<_Ty> &,const std::allocator<_Other> &)' : could not deduce template argument for 'const std::allocator<_Ty> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xmemory(165) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::allocator<_Ty> &,const std::allocator<_Other> &)' : could not deduce template argument for 'const std::allocator<_Ty> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xmemory(165) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::istreambuf_iterator<_Elem,_Traits> &,const std::istreambuf_iterator<_Elem,_Traits> &)' : could not deduce template argument for 'const std::istreambuf_iterator<_Elem,_Traits> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xutility(940) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::istreambuf_iterator<_Elem,_Traits> &,const std::istreambuf_iterator<_Elem,_Traits> &)' : could not deduce template argument for 'const std::istreambuf_iterator<_Elem,_Traits> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xutility(940) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::istreambuf_iterator<_Elem,_Traits> &,const std::istreambuf_iterator<_Elem,_Traits> &)' : could not deduce template argument for 'const std::istreambuf_iterator<_Elem,_Traits> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xutility(940) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xutility(641) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xutility(641) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\xutility(641) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\utility(57) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\utility(57) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2784: 'bool std::operator ==(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::string'
F:\Microsoft\VS2003\Vc7\include\utility(57) : see declaration of 'std::operator`==''
test2.cpp(7) : error C2676: binary '==' : 'std::string' does not define this operator or a conversion to a type acceptable to the predefined operator


тут я сам точно не разберусь...
Best regards,
Oleg A. Bachin
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.