473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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\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<unsigned int,class std::allocator<unsigned int>
::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<unsigned int,class std::allocator<unsigned int>::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<class CString,class std::allocator<class CString>::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<class CString,class std::allocator<class CString>::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 ??

--

Alan Benn
Jul 19 '05 #1
1 5884
> #include <vector>
...
vector<CString> m_nameList; // Names of the chips
That's on-topic at news:microsoft.public.vc.language

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.

--
Phlip
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Kylotan | last post by:
I have the following code: def IntToRandFloat(x): """Given a 32-bit integer, return a float in """ x = int(x) x = int(x << 13) ^ x return...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
5
by: Adrian | last post by:
Hi all, I am getting a warning compiling the following code using Borland C++ Builder 6, but I dont think I am doing anything wrong. When using g++ I get no warnings at all with a g++ -Wall...
20
by: Anonymous | last post by:
Is there a non-brute force method of doing this? transform() looked likely but had no predefined function object. std::vector<double> src; std::vector<int> dest; ...
27
by: Marcus Kwok | last post by:
I am getting warnings when comparing a (regular) int to the value returned from std::vector.size() in code similar to the following: int i = //stuff if (i >= vec.size()) The compiler gives...
8
by: Manuel | last post by:
Hi! If I've a vector filled with abstract classes, can I push in it the derived classes too? Even if derived classes have new methods? I've done some experiments, and it seem I can push the...
8
by: markww | last post by:
Hi, If I have a vector of structs like this: struct IMAGE { unsigned char *pPix; string strName; int nNumber; };
4
by: gallows | last post by:
I've tried to use C qsort() on an object derivate by std::vector, but it doesn't work. I've the follow structure: struct Item { std::string name; int number; }
9
by: Chris Roth | last post by:
I have a vector of vectors: vector< vector<double v; and have initialized it with: v( 5 ); as I know I will have 5 columns of data. At this point, I read text file data into each of the the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.