Click here to Skip to main content
15,917,926 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: How to pass an array to a COM method that accept a VARIANT * Pin
Stuart Dootson10-May-07 21:04
professionalStuart Dootson10-May-07 21:04 
GeneralRe: How to pass an array to a COM method that accept a VARIANT * Pin
Jörgen Sigvardsson13-May-07 7:43
Jörgen Sigvardsson13-May-07 7:43 
GeneralRe: How to pass an array to a COM method that accept a VARIANT * Pin
Stuart Dootson13-May-07 8:31
professionalStuart Dootson13-May-07 8:31 
GeneralRe: How to pass an array to a COM method that accept a VARIANT * Pin
Jörgen Sigvardsson13-May-07 8:36
Jörgen Sigvardsson13-May-07 8:36 
QuestionFiring Event from worker thread - Q280512 Pin
Satishkumar.B10-May-07 4:19
Satishkumar.B10-May-07 4:19 
AnswerRe: Firing Event from worker thread - Q280512 Pin
Roger Stoltz10-May-07 21:11
Roger Stoltz10-May-07 21:11 
AnswerRe: Firing Event from worker thread - Q280512 Pin
Lim Bio Liong13-May-07 7:03
Lim Bio Liong13-May-07 7:03 
QuestionPair and iterator Pin
csx0088-May-07 20:16
csx0088-May-07 20:16 
//Belows are from MSDN2003, an example about hash_set::find
// hash_map_find.cpp
// compile with: /EHsc
#define _DEFINE_DEPRECATED_HASH_CLASSES 0
#include <hash_map>
#include <iostream>

int main( )
{
using namespace std;
using namespace stdext;
hash_map <int, int=""> hm1;
hash_map <int, int=""> :: const_iterator hm1_AcIter, hm1_RcIter;
typedef pair <int, int=""> Int_Pair;

hm1.insert ( Int_Pair ( 1, 10 ) );
hm1.insert ( Int_Pair ( 2, 20 ) );
hm1.insert ( Int_Pair ( 3, 30 ) );

hm1_RcIter = hm1.find( 2 );
cout << "The element of hash_map hm1 with a key of 2 is: "
<< hm1_RcIter -> second << "." << endl;

// If no match is found for the key, end( ) is returned
hm1_RcIter = hm1.find( 4 );

if ( hm1_RcIter == hm1.end( ) )
cout << "The hash_map hm1 doesn't have an element "
<< "with a key of 4." << endl;
else
cout << "The element of hash_map hm1 with a key of 4 is: "
<< hm1_RcIter -> second << "." << endl;

// The element at a specific location in the hash_map can be found
// using a dereferenced iterator addressing the location
hm1_AcIter = hm1.end( );
hm1_AcIter--;
hm1_RcIter = hm1.find( hm1_AcIter -> first );
cout << "The element of hm1 with a key matching "
<< "that of the last element is: "
<< hm1_RcIter -> second << "." << endl;
}


Output

The element of hash_map hm1 with a key of 2 is: 20.
The hash_map hm1 doesn't have an element with a key of 4.
The element of hm1 with a key matching that of the last element is: 30

My question is: hm1_RcIter is definded as a iterator, how can it use the member function of Pair: "hm1_RcIter -> second "? what is wrong?
AnswerRe: Pair and iterator Pin
Michael Sadlon24-May-07 14:31
Michael Sadlon24-May-07 14:31 
Questionhow to format a string without using MFC and CRT? Pin
samfromcn8-May-07 17:32
samfromcn8-May-07 17:32 
AnswerRe: how to format a string without using MFC and CRT? Pin
Stephen Hewitt8-May-07 17:53
Stephen Hewitt8-May-07 17:53 
QuestionHow to port C++ dll in Linux to Windows? Pin
dipuks8-May-07 16:22
dipuks8-May-07 16:22 
QuestionRe: How to port C++ dll in Linux to Windows? Pin
Hamid_RT20-May-07 19:43
Hamid_RT20-May-07 19:43 
QuestionProblem with AtlAxCreateDialog Pin
aamir.zia7-May-07 9:22
aamir.zia7-May-07 9:22 
AnswerRe: Problem with AtlAxCreateDialog Pin
Stephen Hewitt7-May-07 14:07
Stephen Hewitt7-May-07 14:07 
QuestionMenu using ATL Pin
nas_mit3-May-07 7:57
nas_mit3-May-07 7:57 
AnswerRe: Menu using ATL Pin
ajitatif angajetor15-May-07 21:25
ajitatif angajetor15-May-07 21:25 
QuestionOpening a file in its program? Pin
Nada Adel2-May-07 23:24
Nada Adel2-May-07 23:24 
Questionplease read this: its urgent Pin
Banks K2-May-07 3:50
Banks K2-May-07 3:50 
AnswerRe: please read this: its urgent Pin
Paul Conrad4-May-07 13:51
professionalPaul Conrad4-May-07 13:51 
AnswerRe: please read this: its urgent Pin
Hamid_RT20-May-07 19:50
Hamid_RT20-May-07 19:50 
QuestionHow do i pass an array of long to the method of COM? Pin
viral_umang@hotmail.com30-Apr-07 19:10
viral_umang@hotmail.com30-Apr-07 19:10 
AnswerRe: How do i pass an array of long to the method of COM? Pin
led mike1-May-07 4:36
led mike1-May-07 4:36 
AnswerRe: How do i pass an array of long to the method of COM? Pin
lafleon2-May-07 10:23
lafleon2-May-07 10:23 
AnswerRe: How do i pass an array of long to the method of COM? Pin
Stephen Hewitt2-May-07 16:09
Stephen Hewitt2-May-07 16:09 

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.