Click here to Skip to main content
16,016,301 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what is the difference between dump and snapshot Pin
Madhu Nair1-Jul-09 23:04
Madhu Nair1-Jul-09 23:04 
GeneralRe: what is the difference between dump and snapshot Pin
krish_kumar2-Jul-09 1:34
krish_kumar2-Jul-09 1:34 
QuestionHow can send Notification SMS to recipient? Pin
Le@rner1-Jul-09 19:13
Le@rner1-Jul-09 19:13 
QuestionContext Sensitive Help for floating dialog bar Pin
Anuradha V1-Jul-09 19:09
Anuradha V1-Jul-09 19:09 
QuestionAll values of SPropValue member Value.lpszW? Pin
Le@rner1-Jul-09 18:37
Le@rner1-Jul-09 18:37 
GeneralRe: All values of SPropValue member Value.lpszW? Pin
Madhu Nair1-Jul-09 19:09
Madhu Nair1-Jul-09 19:09 
QuestionAdd Docking Pane to MDI Child window (MFC Feature Pack 2008) PinPopular
praskumbhare1-Jul-09 10:54
praskumbhare1-Jul-09 10:54 
Questioniterator Pin
Waldemar Ork1-Jul-09 10:15
Waldemar Ork1-Jul-09 10:15 
I've got this piece of code:

#include <iostream>
#include <string>
#include <map>
#include <vector>
using namespace std;
int main()
{
   {
  
      int ia11[30] = {3,9,17,21,24,31,33,36,42,49,
                                 4,8,19,22,28,30,34,39,43,47,
                                 2,6,10,13,14,25,29,37,38,46};
      int ia34[30] ={1,6,12,15,22,27,31,32,41,42
                              ,4,7,14,17,23,30,33,36,45,48
                              ,2,9,13,18,21,26,34,39,44,49};
      int ia72[30] = {3,8,11,18,22,25,36,37,43,46
                              ,1,6,16,17,23,28,35,40,41,44
                              ,2,5,12,19,24,27,31,34,42,49};
      int ia167[30] ={3,4,12,15,21,28,32,39,47,48
                              ,6,9,16,17,29,30,31,38,41,42
                              ,7,8,11,20,26,27,34,35,45,46};
      int ia190[30] = {3,10,11,14,22,23,32,35,43,44
                              ,6,9,16,19,24,29,37,38,45,48
                              ,2,5,13,18,25,30,31,40,41,0};
      int ia21[30] ={ 2,5,16,19,25,30,34,39,45,48,
                                 1,9,12,13,21,24,33,36,44,49,
                                 3,8,15,20,23,26,35,40,43,46};
      int ia64[30] ={6,9,13,20,28,29,33,40,43,48
                              ,2,7,16,19,24,27,31,34,44,47
                              ,5,8,14,17,21,30,32,37,41,46};
      int ia102[30] ={4,9,14,19,22,29,35,38,46,47
                              ,5,8,13,16,21,26,33,40,41,48
                              ,6,7,15,17,28,30,32,39,42,45};
      int ia178[30] ={6,9,15,20,23,24,37,38,42,45
                              ,7,8,16,19,22,25,34,39,43,46
                              ,1,2,17,18,26,29,31,40,47,0};
      int ia180[30] ={1,4,13,18,27,30,33,38,45,46
                              ,2,3,12,15,22,23,39,40,44,47
                              ,8,9,11,17,24,25,32,37,49,0};
                             
      vector<int>via11(ia11,ia11+30);
      vector<int>via34(ia34,ia34+30);
      vector<int>via72(ia72,ia72+30);
      vector<int>via167(ia167,ia167+30);
      vector<int>via190(ia190,ia190+30);
      vector<int>via21(ia21,ia21+30);
      vector<int>via64(ia64,ia64+30);
      vector<int>via102(ia102,ia102+30);
      vector<int>via178(ia178,ia178+30);
      vector<int>via180(ia180,ia180+30);
        
typedef map<string,vector<int>>container;
container::iterator it;
container map;                                       

      map.insert(make_pair("ia11", via11));
      map.insert(make_pair("ia34", via34));
      map.insert(make_pair("ia72", via72));
      map.insert(make_pair("ia167", via167));
      map.insert(make_pair("ia190", via190));
      map.insert(make_pair("ia21", via21));
      map.insert(make_pair("ia64", via64));
      map.insert(make_pair("ia102", via102));
      map.insert(make_pair("ia178", via178));
      map.insert(make_pair("ia180", via180));                           


for (it=map.begin();it!(=map.end();++it))
cout<<it->second<<;                  //the compiler stops here!
cout<<endl;                                                   
}
      system("PAUSE");
      return (0);
}
At the very end there is an error. I,d like the iterator /it/ to find vectors of integers intelligently and display them in the order the strings in the map container appear. I don't know how to do it. Could anybody possibly help me?
QuestionRe: iterator Pin
David Crow1-Jul-09 10:22
David Crow1-Jul-09 10:22 
AnswerRe: iterator Pin
Stuart Dootson1-Jul-09 10:59
professionalStuart Dootson1-Jul-09 10:59 
GeneralRe: iterator Pin
led mike1-Jul-09 11:05
led mike1-Jul-09 11:05 
GeneralRe: iterator Pin
Waldemar Ork1-Jul-09 11:23
Waldemar Ork1-Jul-09 11:23 
QuestionMFC Pin
kumar sanghvi1-Jul-09 7:28
kumar sanghvi1-Jul-09 7:28 
AnswerRe: MFC Pin
led mike1-Jul-09 7:33
led mike1-Jul-09 7:33 
AnswerRe: MFC Pin
Stuart Dootson1-Jul-09 9:05
professionalStuart Dootson1-Jul-09 9:05 
AnswerRe: MFC Pin
transoft1-Jul-09 9:41
transoft1-Jul-09 9:41 
AnswerRe: MFC Pin
Alan Balkany2-Jul-09 5:00
Alan Balkany2-Jul-09 5:00 
QuestionIs there a easy way to move chunk of memory? Pin
transoft1-Jul-09 5:39
transoft1-Jul-09 5:39 
AnswerRe: Is there a easy way to move chunk of memory? Pin
led mike1-Jul-09 5:48
led mike1-Jul-09 5:48 
QuestionRe: Is there a easy way to move chunk of memory? Pin
CPallini1-Jul-09 7:38
mveCPallini1-Jul-09 7:38 
AnswerRe: Is there a easy way to move chunk of memory? Pin
Chris Losinger1-Jul-09 8:00
professionalChris Losinger1-Jul-09 8:00 
QuestionFile Sharing (not) Pin
Caslen1-Jul-09 5:02
Caslen1-Jul-09 5:02 
AnswerRe: File Sharing (not) Pin
David Crow1-Jul-09 5:26
David Crow1-Jul-09 5:26 
GeneralRe: File Sharing (not) Pin
Caslen1-Jul-09 5:33
Caslen1-Jul-09 5:33 
GeneralRe: File Sharing (not) Pin
Stuart Dootson1-Jul-09 6:12
professionalStuart Dootson1-Jul-09 6:12 

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.