Click here to Skip to main content
15,883,883 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Error c2061 Pin
fenixk198-Sep-05 10:30
fenixk198-Sep-05 10:30 
QuestionDifference between visual c++ and visual c++.net Pin
Ming Luo8-Sep-05 7:03
Ming Luo8-Sep-05 7:03 
AnswerRe: Difference between visual c++ and visual c++.net Pin
David Crow8-Sep-05 7:29
David Crow8-Sep-05 7:29 
AnswerRe: Difference between visual c++ and visual c++.net Pin
Christian Graus8-Sep-05 12:27
protectorChristian Graus8-Sep-05 12:27 
GeneralRe: Difference between visual c++ and visual c++.net Pin
Ming Luo8-Sep-05 21:45
Ming Luo8-Sep-05 21:45 
GeneralRe: Difference between visual c++ and visual c++.net Pin
Christian Graus11-Sep-05 11:15
protectorChristian Graus11-Sep-05 11:15 
QuestionMS Hierarchical FlexGrid Pin
pjhenry12168-Sep-05 5:31
pjhenry12168-Sep-05 5:31 
Questionhow to accessing std:map (index)th element Pin
yccheok8-Sep-05 4:42
yccheok8-Sep-05 4:42 
May I know how I can access map by index just like I access vector by index?

cout<< "This is the 10th element (0 based) in my vector = "<< myVector[10];

For map, when I wish to access the 10th element (0 based), I would do the following:

map<char *,="" int="">::iterator curr, end;

end = myMap.end();

curr = myMap.begin();



for(int i=0; i<10; i++) {

curr++;

}


cout<< "This is the 10th element (0 based) in my map = "<< myMap->second;

I was wondering whether is there any better way other than having to loop through all the items? For example:

/* The following code is just a wish, it is not valid. */
cout<< "This is the 10th element (0 based) in my vector = "<< myMap.getItemByIndex(10);

Thank you.

cheok
AnswerRe: how to accessing std:map (index)th element Pin
Maximilien8-Sep-05 5:54
Maximilien8-Sep-05 5:54 
GeneralRe: how to accessing std:map (index)th element Pin
garbash8-Sep-05 7:06
garbash8-Sep-05 7:06 
AnswerRe: how to accessing std:map (index)th element Pin
Bob Stanneveld8-Sep-05 10:42
Bob Stanneveld8-Sep-05 10:42 
QuestionEdit a record in a DB table opened with ODBC Pin
sirtimid8-Sep-05 4:32
sirtimid8-Sep-05 4:32 
AnswerRe: Edit a record in a DB table opened with ODBC Pin
David Crow8-Sep-05 4:35
David Crow8-Sep-05 4:35 
GeneralRe: Edit a record in a DB table opened with ODBC Pin
sirtimid8-Sep-05 4:51
sirtimid8-Sep-05 4:51 
GeneralRe: Edit a record in a DB table opened with ODBC Pin
David Crow8-Sep-05 5:53
David Crow8-Sep-05 5:53 
QuestionRedefinition Pin
Babto8-Sep-05 4:13
Babto8-Sep-05 4:13 
AnswerRe: Redefinition Pin
Cedric Moonen8-Sep-05 4:17
Cedric Moonen8-Sep-05 4:17 
GeneralRe: Redefinition Pin
Babto8-Sep-05 5:41
Babto8-Sep-05 5:41 
GeneralRe: Redefinition Pin
Maximilien8-Sep-05 5:59
Maximilien8-Sep-05 5:59 
AnswerRe: Redefinition Pin
David Crow8-Sep-05 4:32
David Crow8-Sep-05 4:32 
QuestionProblem with worker thread Pin
ashtwin8-Sep-05 4:06
ashtwin8-Sep-05 4:06 
AnswerRe: Problem with worker thread Pin
David Crow8-Sep-05 4:34
David Crow8-Sep-05 4:34 
AnswerRe: Problem with worker thread Pin
Marc Soleda8-Sep-05 4:37
Marc Soleda8-Sep-05 4:37 
AnswerRe: Problem with worker thread Pin
Jim Howard8-Sep-05 12:54
Jim Howard8-Sep-05 12:54 
AnswerRe: Problem with worker thread Pin
ThatsAlok8-Sep-05 18:16
ThatsAlok8-Sep-05 18:16 

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.