What's wrong with my Map ???

L

Liza

hi guys,

so i tried to create a map of numbers and with the number of times
thata specific number appears as follows :


map<int,int> allNumbers;
const int MAX=10;

void storeNumbersToMap()
{
int j=0;

for(int i=0; i<allSetsOfNumbers.size();i++)
{
vector<int>numbers= allSetsOfNumbers.getNumbers();//returns
const vector
while ( j < MAX )
allNumbers[numbers[j]]++;
}
}



but i keep getting the following error message...........

C:\Lottery\lottery.cpp(206) : warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int
::_Kfn,std::less<int>,std::allocator<int> >::iterator,std::pair<int
const
,int>,std::pair<int const ,int> &,std::pair<int const ,int> *,int>' :
identifier was truncated to '255' characters in the debug information

can anyone tell me why.....what does this error mean? i thought that a
map can hold elements and values of any type?



thanks
Liza
 
V

Victor Bazarov

Liza said:
so i tried to create a map of numbers and with the number of times
thata specific number appears as follows :


map<int,int> allNumbers;
const int MAX=10;

void storeNumbersToMap()
{
int j=0;

for(int i=0; i<allSetsOfNumbers.size();i++)
{
vector<int>numbers= allSetsOfNumbers.getNumbers();//returns
const vector
while ( j < MAX )
allNumbers[numbers[j]]++;


'j' is not being incremented here. Are you sure you need
this infinite loop?
}
}



but i keep getting the following error message...........

It's not an error message.
C:\Lottery\lottery.cpp(206) : warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int

const
,int>,std::pair<int const ,int> &,std::pair<int const ,int> *,int>' :
identifier was truncated to '255' characters in the debug information

can anyone tell me why.....what does this error mean? i thought that a
map can hold elements and values of any type?

It's a warning. Put the cursor on the number (C4786) and press F1.

Victor
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top