Click here to Skip to main content
15,905,238 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Problem in passing a VARIANT to IXMLDOMNodePtr Pin
myshketer9-Oct-07 21:30
myshketer9-Oct-07 21:30 
QuestionHow to implement Collections in ATL? Pin
concoran5-Oct-07 22:15
concoran5-Oct-07 22:15 
AnswerRe: How to implement Collections in ATL? Pin
Michael Dunn7-Oct-07 21:20
sitebuilderMichael Dunn7-Oct-07 21:20 
Questionhow to change toolbar in session expiary Pin
rindam5-Oct-07 20:01
rindam5-Oct-07 20:01 
AnswerRe: how to change toolbar in session expiary Pin
yytg11-Oct-07 5:32
yytg11-Oct-07 5:32 
QuestionFinding in a vector of Structure Pin
Pankaj.Jain5-Oct-07 19:59
professionalPankaj.Jain5-Oct-07 19:59 
AnswerRe: Finding in a vector of Structure Pin
John R. Shaw5-Oct-07 23:53
John R. Shaw5-Oct-07 23:53 
AnswerRe: Finding in a vector of Structure Pin
Stephen Hewitt7-Oct-07 14:38
Stephen Hewitt7-Oct-07 14:38 
Perhaps something like this:
----------------------------

// Console.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

struct Data
{
Data(int Num1, int Num2) : m_Num1(Num1), m_Num2(Num2) {}
int m_Num1;
int m_Num2;

friend bool operator==(const Data &lhs, const Data &rhs)
{
return (lhs.m_Num1 == rhs.m_Num1) && (lhs.m_Num2 == rhs.m_Num2);
}
};

void main()
{
// Create and populate the collection.
typedef vector<Data> coll_t;
coll_t coll;
coll.push_back(Data(3, 1));
coll.push_back(Data(4, 1));
coll.push_back(Data(5, 9));
coll.push_back(Data(2, 6));
coll.push_back(Data(5, 3));

// Find first (5, 9).
coll_t::const_iterator i = find(coll.begin(), coll.end(), Data(5, 9));
if (i != coll.end())
{
cout << "Found at index: " << (i-coll.begin()) << endl;
}
}


Steve
Questionhow to use max_element with a vector Pin
s196675m5-Oct-07 13:21
s196675m5-Oct-07 13:21 
AnswerRe: how to use max_element with a vector Pin
John R. Shaw6-Oct-07 0:27
John R. Shaw6-Oct-07 0:27 
QuestionMessage handling Pin
_tasleem5-Oct-07 11:13
_tasleem5-Oct-07 11:13 
QuestionProblem with DispEventAdvise Pin
sandeepkavade4-Oct-07 18:50
sandeepkavade4-Oct-07 18:50 
AnswerRe: Problem with DispEventAdvise Pin
Stuart Dootson4-Oct-07 21:48
professionalStuart Dootson4-Oct-07 21:48 
QuestionWhich DWebBrowserEvents2 function is called when we Rrefresh a webpage Pin
Dhiraj kumar Saini4-Oct-07 1:56
Dhiraj kumar Saini4-Oct-07 1:56 
QuestionAdding a dialog in resource as child window at runtime? Pin
Gyan Prakash3-Oct-07 21:44
Gyan Prakash3-Oct-07 21:44 
QuestionVector Pin
mcsherry3-Oct-07 5:17
mcsherry3-Oct-07 5:17 
AnswerRe: Vector Pin
Chris Losinger3-Oct-07 5:36
professionalChris Losinger3-Oct-07 5:36 
GeneralRe: Vector Pin
mcsherry3-Oct-07 5:47
mcsherry3-Oct-07 5:47 
GeneralRe: Vector Pin
mcsherry3-Oct-07 5:54
mcsherry3-Oct-07 5:54 
GeneralRe: Vector Pin
Chris Losinger3-Oct-07 6:11
professionalChris Losinger3-Oct-07 6:11 
GeneralRe: Vector Pin
Nemanja Trifunovic3-Oct-07 7:47
Nemanja Trifunovic3-Oct-07 7:47 
AnswerRe: Vector Pin
Nathan Holt at EMOM3-Oct-07 11:10
Nathan Holt at EMOM3-Oct-07 11:10 
AnswerRe: Vector Pin
John R. Shaw6-Oct-07 0:55
John R. Shaw6-Oct-07 0:55 
QuestionHow to detect page refresh in vc++ Pin
rindam3-Oct-07 3:19
rindam3-Oct-07 3:19 
Questionsending sms through aspx.cs code in c# Pin
sh_india61@yahoo.com3-Oct-07 2:39
sh_india61@yahoo.com3-Oct-07 2:39 

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.