Click here to Skip to main content
16,005,344 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IE tabbing "bug" - SOLVED Pin
Jim Crafton24-Apr-08 6:40
Jim Crafton24-Apr-08 6:40 
Generalfast deserialization from a buffer to a std::Vector Pin
manustone24-Apr-08 3:30
manustone24-Apr-08 3:30 
QuestionHow to create a window using MFC in which we can be able to control each and every viewport independently. Pin
Venkata Rama Krishna K24-Apr-08 3:18
Venkata Rama Krishna K24-Apr-08 3:18 
AnswerRe: How to create a window using MFC in which we can be able to control each and every viewport independently. Pin
Mark Salsbery24-Apr-08 6:16
Mark Salsbery24-Apr-08 6:16 
QuestionHow to get appear times between 2 and 5 in a vector? Pin
hanlei000000000924-Apr-08 1:31
hanlei000000000924-Apr-08 1:31 
AnswerRe: How to get appear times between 2 and 5 in a vector? Pin
Saurabh.Garg24-Apr-08 2:11
Saurabh.Garg24-Apr-08 2:11 
AnswerRe: How to get appear times between 2 and 5 in a vector? Pin
vijay_aroli24-Apr-08 2:33
vijay_aroli24-Apr-08 2:33 
AnswerRe: How to get appear times between 2 and 5 in a vector? [modified] Pin
BadKarma24-Apr-08 2:54
BadKarma24-Apr-08 2:54 
This should work

extern vector vData; // 1,2,3,4,5,5,5,6,6,7,7,7,7,7,7
//  loop count occurance of all items using a map
//
std::map<int, int> mapCount;
for(std::vector<int>::const_iterator it = vData.begin(); it != vData.end(); it++)
{
  mapCount[*it]++;
}

//  check the map and save the data you need
//
std::vector<int> vFound;
for(std::map<int, int>::const_iterator itmap = mapCount.begin(); itmap != mapCount.end(); itmap++)
{
  if(itmap->second >= 2 &&
     itmap->second <= 5)
  {
    vFound.push_back(itmap->first);
  }
}


codito ergo sum

modified on Thursday, April 24, 2008 1:24 PM

GeneralRe: How to get appear times between 2 and 5 in a vector? Pin
Saurabh.Garg24-Apr-08 4:10
Saurabh.Garg24-Apr-08 4:10 
JokeRe: How to get appear times between 2 and 5 in a vector? Pin
BadKarma24-Apr-08 4:21
BadKarma24-Apr-08 4:21 
GeneralRe: How to get appear times between 2 and 5 in a vector? Pin
hanlei000000000926-Apr-08 21:22
hanlei000000000926-Apr-08 21:22 
GeneralReagarding MFC and ASP communication Pin
H4u3224-Apr-08 1:30
H4u3224-Apr-08 1:30 
QuestionSignificance of THIS_FILE[]=__FILE__ ? Pin
SherTeks24-Apr-08 0:59
SherTeks24-Apr-08 0:59 
GeneralRe: Significance of THIS_FILE[]=__FILE__ ? Pin
Cedric Moonen24-Apr-08 1:01
Cedric Moonen24-Apr-08 1:01 
GeneralRe: Significance of THIS_FILE[]=__FILE__ ? Pin
SherTeks24-Apr-08 1:12
SherTeks24-Apr-08 1:12 
GeneralRe: Significance of THIS_FILE[]=__FILE__ ? Pin
Cedric Moonen24-Apr-08 1:14
Cedric Moonen24-Apr-08 1:14 
GeneralRe: Significance of THIS_FILE[]=__FILE__ ? Pin
SherTeks24-Apr-08 1:35
SherTeks24-Apr-08 1:35 
Questionwhy VARIANT,BSTR in ActiveX? Pin
lgatcodeproject24-Apr-08 0:57
lgatcodeproject24-Apr-08 0:57 
GeneralRe: why VARIANT,BSTR in ActiveX? Pin
CPallini24-Apr-08 1:07
mveCPallini24-Apr-08 1:07 
GeneralRe: why VARIANT,BSTR in ActiveX? Pin
Matthew Faithfull24-Apr-08 1:11
Matthew Faithfull24-Apr-08 1:11 
Generalwhat would be the type is the client is c sharp? Pin
lgatcodeproject24-Apr-08 1:15
lgatcodeproject24-Apr-08 1:15 
AnswerRe: what would be the type is the client is c sharp? Pin
prasad_som24-Apr-08 1:58
prasad_som24-Apr-08 1:58 
GeneralRe: what would be the type is the client is c sharp? Pin
Matthew Faithfull24-Apr-08 2:56
Matthew Faithfull24-Apr-08 2:56 
GeneralRe: what would be the type is the client is c sharp? Pin
lgatcodeproject24-Apr-08 3:00
lgatcodeproject24-Apr-08 3:00 
GeneralDifferent types of classes in c++ Pin
Deepu Antony24-Apr-08 0:44
Deepu Antony24-Apr-08 0:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.