C2621 when using "find_first_of" (STL)

N

Neo

Greetings!

I'm now building some VC6-compatible programs under VC7 (VS.NET 2003). Here
is my problem:

vector<wstring>::iterator itArgv;
// ......
if (basic_string<wstring>::npos !=
itArgv->find_first_of(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1)) // error C2621
{
// ......
}

Based on the header file "xstring", "find_first_of" returns "npos" when the
data specified cannot be found. How can I test the return value without
C2621?

Thanks in advance!

Neo
 
K

Ken Alverson

Neo said:
Based on the header file "xstring", "find_first_of" returns "npos" when the
data specified cannot be found. How can I test the return value without
C2621?

Don't make us look it up, what is the text of error C2621?

Ken
 
T

tom_usenet

Greetings!

I'm now building some VC6-compatible programs under VC7 (VS.NET 2003). Here
is my problem:

vector<wstring>::iterator itArgv;
// ......
if (basic_string<wstring>::npos !=

if (wstring::npos !=
itArgv->find_first_of(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1)) // error C2621
{
// ......
}

Based on the header file "xstring", "find_first_of" returns "npos" when the
data specified cannot be found. How can I test the return value without
C2621?

I assume it's just the typo above causing the problem.

Tom
 
S

Stephen Howe

How can I test the return value without C2621?

And what is C2621? (I can't be bothered to look it up - you do the work -it
is your problem that you want help with).

Stephen Howe
 
N

Neo

Sorry that I forgot to add my build log here.

============================================================================
===========================
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xstring(1525)
: error C2621: member 'std::basic_string<_Elem>::_Bxty::_Buf' of union
'std::basic_string<_Elem>::_Bxty' has copy constructor
with
[
_Elem=std::wstring
]
and
[
_Elem=std::wstring
]
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xstring(1527) : see reference to class template
instantiation 'std::basic_string<_Elem>::_Bxty' being compiled
with
[
_Elem=std::wstring
]
e:\projects\server\server.cpp(348) : see reference to class template
instantiation 'std::basic_string<_Elem>' being compiled
with
[
_Elem=std::wstring
]
============================================================================
================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top