Click here to Skip to main content
15,888,461 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionModularizing Help Pin
Aaronov20-Oct-10 13:07
Aaronov20-Oct-10 13:07 
AnswerRe: Modularizing Help Pin
Richard MacCutchan20-Oct-10 21:57
mveRichard MacCutchan20-Oct-10 21:57 
AnswerRe: Modularizing Help Pin
@Intersect☺™17-Nov-10 11:06
professional@Intersect☺™17-Nov-10 11:06 
GeneralRe: Modularizing Help Pin
Aaronov17-Nov-10 11:17
Aaronov17-Nov-10 11:17 
QuestionCList inside a CMap Pin
kasi1420-Oct-10 8:51
kasi1420-Oct-10 8:51 
AnswerRe: CList inside a CMap Pin
Richard MacCutchan20-Oct-10 21:58
mveRichard MacCutchan20-Oct-10 21:58 
AnswerRe: CList inside a CMap Pin
Cool_Dev21-Oct-10 0:15
Cool_Dev21-Oct-10 0:15 
Questionvector<string> and find Pin
Jonnster20-Oct-10 3:33
Jonnster20-Oct-10 3:33 
I have a vector of strings which I want to search for a particular string.

I am using:

vector<string>::iterator it = find( vecStrings.begin(), vecStrings.end(), sMax );

sMax is a std::string

When I compile this (and it is specifically this line causing the problem) I get the following:

c:\program files\microsoft visual studio\vc98\include\algorithm(43) : 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 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : error C2784: 'bool __cdecl std::operator ==(const class std::allocator<_Ty> &,const class std::allocator<_U> &)' : could not deduce template argument for 'const class std::allocat
or<_Ty> &' from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : 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 fo
r 'const class std::istream_iterator<_U,_E,_Tr> &' from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : 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 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : error C2784: 'bool __cdecl std::operator ==(const class std::istreambuf_iterator<_E,_Tr> &,const class std::istreambuf_iterator<_E,_Tr> &)' : could not deduce template argument fo
r 'const class std::istreambuf_iterator<_E,_Tr> &' from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : error C2784: 'bool __cdecl std::operator ==(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce te
mplate argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : error C2784: 'bool __cdecl std::operator ==(const struct std::pair<_T1,_T2> &,const struct std::pair<_T1,_T2> &)' : could not deduce template argument for 'const struct std::pair<
_T1,_T2> &' from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled
c:\program files\microsoft visual studio\vc98\include\algorithm(43) : error C2676: binary '==' : 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' does not define this operator or a conversion to a type accept
able to the predefined operator
C:\test\test.cpp(6846) : see reference to function template instantiation 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *__cdecl std::find(class std::basic_string<char,struct std::char_trai
ts<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)' being compiled


Any ideas?
AnswerRe: vector and find [modified] PinPopular
Alain Rist20-Oct-10 5:04
Alain Rist20-Oct-10 5:04 
Questionhow to allocate memory dynamically for 2 dimensional array and use that pointer like and array.... Pin
cmaheshwari1619-Oct-10 18:40
cmaheshwari1619-Oct-10 18:40 
AnswerRe: how to allocate memory dynamically for 2 dimensional array and use that pointer like and array.... Pin
Stuart Dootson20-Oct-10 1:11
professionalStuart Dootson20-Oct-10 1:11 
Questionabout pthread.h Pin
lxlenovostar18-Oct-10 5:36
lxlenovostar18-Oct-10 5:36 
AnswerRe: about pthread.h Pin
Richard MacCutchan18-Oct-10 9:28
mveRichard MacCutchan18-Oct-10 9:28 
GeneralRe: about pthread.h Pin
lxlenovostar18-Oct-10 15:59
lxlenovostar18-Oct-10 15:59 
GeneralRe: about pthread.h Pin
Richard MacCutchan18-Oct-10 22:27
mveRichard MacCutchan18-Oct-10 22:27 
GeneralRe: about pthread.h Pin
lxlenovostar18-Oct-10 23:13
lxlenovostar18-Oct-10 23:13 
GeneralRe: about pthread.h Pin
Richard MacCutchan19-Oct-10 0:26
mveRichard MacCutchan19-Oct-10 0:26 
Questionproblem Pin
samosato12-Oct-10 9:57
samosato12-Oct-10 9:57 
AnswerRe: problem Pin
Nuri Ismail12-Oct-10 21:55
Nuri Ismail12-Oct-10 21:55 
AnswerRe: problem Pin
Richard MacCutchan12-Oct-10 22:38
mveRichard MacCutchan12-Oct-10 22:38 
AnswerRe: problem [modified] Pin
Alain Rist13-Oct-10 4:52
Alain Rist13-Oct-10 4:52 
QuestionFire connection point event from ATL Service Pin
pratik_mishra3511-Oct-10 2:17
pratik_mishra3511-Oct-10 2:17 
Questionhow show the tooltip in each platform(vb,c#) Pin
765studio@gmail.com8-Oct-10 20:35
765studio@gmail.com8-Oct-10 20:35 
QuestionProblems to print Pin
Dansveen7-Oct-10 11:42
Dansveen7-Oct-10 11:42 
QuestionWhy normal virtual function required blank body in base class Pin
am 20096-Oct-10 2:22
am 20096-Oct-10 2:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.