vector use warnings

A

Alan Benn

(VC6) When I use the STL <vector> template as follows:

#include <vector>
....
vector<CString> m_nameList; // Names of the chips

I get these compiler warnings :

C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(39) : warning
C4100: '_P' : unreferenced formal parameter
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(41) : warning
C4100: '_P' : unreferenced formal parameter
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(249) : warning
C4663: C++ language change: to explicitly specialize class template 'vector'
use the following syntax:
template<> class vector<bool,class std::allocator<unsigned int> >
....
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(156) : warning
C4018: '<' : signed/unsigned mismatch
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(156) :
while compiling class-template member function 'void __thiscall
std::vector said:
::insert(unsigned int *,unsigned int,const unsig
ned int &)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(167) : warning
C4018: '<' : signed/unsigned mismatch
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(156) :
while compiling class-template member function 'void __thiscall
std::vector said:
::insert(unsigned int *,unsigned int,const unsig
ned int &)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(156) : warning
C4018: '<' : signed/unsigned mismatch
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(156) :
while compiling class-template member function 'void __thiscall
std::vector said:
::insert(class CString *,unsigned int,const cl
ass CString &)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(167) : warning
C4018: '<' : signed/unsigned mismatch
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(156) :
while compiling class-template member function 'void __thiscall
std::vector said:
::insert(class CString *,unsigned int,const cl
ass CString &)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(37) : warning
C4100: '_P' : unreferenced formal parameter
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(68) :
see reference to function template instantiation 'void __cdecl
std::_Destroy(unsigned int *)' being compiled

What am I doing wrong ??
 
P

Phlip

#include said:
...
vector<CString> m_nameList; // Names of the chips

That's on-topic at
This group tries to remain platform neutral, so we can give the best answers
for questions about generally portable code.
What am I doing wrong ??

That newsgroup might know any number of things, such as missing a service
pack.

This newsgroup advises you to try vector<string>, just to see what happens.

You might be about to discover how broken MFC can be. I remember the days
when it simply did not compile with STL.
 

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

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top