![]() |
|
Модераторы: Daevaorn |
![]()
|
|
| SeregaLBN |
|
||||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 178 Регистрация: 3.10.2003 Где: Киев Репутация: нет Всего: нет |
Покажу на примере (пользуюсь VS6).
Есть простой код - класс 'Запись' и класс векторов этих записей:
Всё отлично компилируется. А вот при попытке вложить класс CRecord внутрь CWrapper (т.к. у меня CRecord есть сущность только CWrapper'а) и происходят ошибки. Подскажите что и как тут переделать... Насколько я понимаю, траблы в операторе ==, но вот как исправить... Переделанный код:
А ошибки следующие: error C2784: 'bool __cdecl std::operator ==(const class std::istream_iterator<_U,_E,_Tr> &,const class std::istream_iterator<_U,_E,_Tr> &)' : could not deduce template argument for 'const class std::istream_iterator<_U,_E,_Tr> &' from 'const struct CWrapper::CRecord' see reference to function template instantiation 'const struct CWrapper::CRecord *__cdecl std::find(const struct CWrapper::CRecord *,const struct CWrapper::CRecord *,const struct CWrapper::CRecord &)' being compiled error C2784: 'bool __cdecl std::operator ==(const class std::reverse_bidirectional_iterator<_BI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_bidirectional_iterator<_BI,_Ty,_Rt,_Pt,_D> &)' : could not deduce template argument for 'const class std::reverse_bidirectional_iterator<_BI,_Ty,_Rt,_Pt,_D> &' from 'const struct CWrapper::CRecord' see reference to function template instantiation 'const struct CWrapper::CRecord *__cdecl std::find(const struct CWrapper::CRecord *,const struct CWrapper::CRecord *,const struct CWrapper::CRecord &)' being compiled error C2784: 'bool __cdecl std::operator ==(const class std::vector<_Ty,_A> &,const class std::vector<_Ty,_A> &)' : could not deduce template argument for 'const class std::vector<_Ty,_A> &' from 'const struct CWrapper::CRecord' see reference to function template instantiation 'const struct CWrapper::CRecord *__cdecl std::find(const struct CWrapper::CRecord *,const struct CWrapper::CRecord *,const struct CWrapper::CRecord &)' being compiled |
||||
|
|||||
| SeregaLBN |
|
|||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 178 Регистрация: 3.10.2003 Где: Киев Репутация: нет Всего: нет |
Разобрался. Тема закрыта
|
|||
|
||||
![]()
|
| Правила форума "С++:Общие вопросы" | |
|
|
Добро пожаловать!
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Earnest Daevaorn |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | C/C++: Общие вопросы | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |