vector use warnings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan Benn

    vector use warnings

    (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\INC LUDE\xmemory(39 ) : warning
    C4100: '_P' : unreferenced formal parameter
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\xmemory(41 ) : warning
    C4100: '_P' : unreferenced formal parameter
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(249 ) : warning
    C4663: C++ language change: to explicitly specialize class template 'vector'
    use the following syntax:
    template<> class vector<bool,cla ss std::allocator< unsigned int> >
    ....
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(156 ) : warning
    C4018: '<' : signed/unsigned mismatch
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(156 ) :
    while compiling class-template member function 'void __thiscall
    std::vector<uns igned int,class std::allocator< unsigned int>[color=blue]
    >::insert(unsig ned int *,unsigned int,const unsig[/color]
    ned int &)'
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(167 ) : warning
    C4018: '<' : signed/unsigned mismatch
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(156 ) :
    while compiling class-template member function 'void __thiscall
    std::vector<uns igned int,class std::allocator< unsigned int>[color=blue]
    >::insert(unsig ned int *,unsigned int,const unsig[/color]
    ned int &)'
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(156 ) : warning
    C4018: '<' : signed/unsigned mismatch
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(156 ) :
    while compiling class-template member function 'void __thiscall
    std::vector<cla ss CString,class std::allocator< class CString>[color=blue]
    >::insert(cla ss CString *,unsigned int,const cl[/color]
    ass CString &)'
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(167 ) : warning
    C4018: '<' : signed/unsigned mismatch
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\vector(156 ) :
    while compiling class-template member function 'void __thiscall
    std::vector<cla ss CString,class std::allocator< class CString>[color=blue]
    >::insert(cla ss CString *,unsigned int,const cl[/color]
    ass CString &)'
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\xmemory(37 ) : warning
    C4100: '_P' : unreferenced formal parameter
    C:\Program Files\Microsoft Visual Studio\VC98\INC LUDE\xmemory(68 ) :
    see reference to function template instantiation 'void __cdecl
    std::_Destroy(u nsigned int *)' being compiled

    What am I doing wrong ??

    --

    Alan Benn


  • Phlip

    #2
    Re: vector use warnings

    > #include <vector>[color=blue]
    > ...
    > vector<CString> m_nameList; // Names of the chips[/color]

    That's on-topic at news:microsoft. public.vc.langu age

    This group tries to remain platform neutral, so we can give the best answers
    for questions about generally portable code.
    [color=blue]
    > What am I doing wrong ??[/color]

    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.

    --
    Phlip


    Comment

    Working...