Click here to Skip to main content
16,015,629 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: C# to VC++ Pin
Jörgen Sigvardsson27-May-04 20:30
Jörgen Sigvardsson27-May-04 20:30 
GeneralRe: C# to VC++ Pin
Prakash Nadar27-May-04 23:24
Prakash Nadar27-May-04 23:24 
GeneralLink error ???? (neophite) Pin
De Nardis Andrea26-May-04 23:48
De Nardis Andrea26-May-04 23:48 
GeneralRe: Link error ???? (neophite) Pin
Stuart Dootson27-May-04 3:19
professionalStuart Dootson27-May-04 3:19 
GeneralRe: Link error ???? (neophite) Pin
De Nardis Andrea27-May-04 4:09
De Nardis Andrea27-May-04 4:09 
GeneralFeature of STL map Pin
ra_sasi26-May-04 9:33
ra_sasi26-May-04 9:33 
GeneralRe: Feature of STL map Pin
valikac26-May-04 13:23
valikac26-May-04 13:23 
GeneralRe: Feature of STL map Pin
rsasi26-May-04 17:07
sussrsasi26-May-04 17:07 
Infact IKeyset inherited the feautures of ICollection( which is like list) and IAKeySet(its like map).SO we can add the elements of both with key (like in map)as well as just the element(liek in list). Hope this will suffice.Please look at the code below

#include <iostream>
#include
#include <deque>
#include <utility>
#include <string>
using namespace std;

typedef const string& CIR;
typedef enum { IEArgString, IEArgNumber, IEArgSpecial } IEArgType;


class IEArg {

public:
//* Element name and value and embedded datatype.
string name;
string value;
IEArgType dataType;

//* Default constructor given name and value.
IEArg(CIR n, CIR v) : name(n), value(v) { dataType = IEArgString; }
IEArg(CIR n, CIR v, IEArgType t) : name(n), value(v), dataType(t) { }
friend bool operator<(const IEArg& lhs, const IEArg& rhs);
};


inline bool operator<(const IEArg& lhs, const IEArg& rhs)
{
if (lhs.name == rhs.name && lhs.value == rhs.value)
return FALSE;
else
return TRUE;
}

typedef map<string,iearg> IEArgList;
inline CIR key(const IEArg& iea) { return iea.name; }

typedef deque < IEArg > IEOArgList;

typedef deque < IEOArgList > SUMMARY;

main()
{
int days=10;
IEArgList al;
string where;
string nam="1235";
string val="12";

// Maps and multimaps deal with pairs
typedef pair<string,iearg> entry;

entry p0("Time",IEArg("1100","A"));
entry p1("Time",IEArg("1234","A"));

entry p2("Transaction",IEArg("4567","D"));
entry p4("xransaction",IEArg("2345","B"));

entry p3("ResultCode",IEArg("5678","C"));

al.insert(p0);
al.insert(p1);
al.insert(p2);
al.insert(p4);
al.insert(p3);

/********
I want add just IEArgList just liek a collection with out key

********/

IEArgList::iterator iter;

for (iter = al.begin(); iter != al.end(); iter++) {
cout<<"values are:"<<(*iter).first<<":"<<(*iter).second.value<<":"<<(*iter).second.name<
GeneralRe: Feature of STL map Pin
valikac27-May-04 5:09
valikac27-May-04 5:09 
GeneralRe: Feature of STL map Pin
Paul Ranson27-May-04 12:48
Paul Ranson27-May-04 12:48 
GeneralListView 2000 - XP CPU Usage Pin
Dan Hill26-May-04 6:11
Dan Hill26-May-04 6:11 
GeneralRe: ListView 2000 - XP CPU Usage Pin
Dan Hill26-May-04 6:12
Dan Hill26-May-04 6:12 
Generalerror C2872: 'ATL' : ambiguous symbol in conversion from wtl7.0 to 7.1 Pin
bryces25-May-04 1:20
bryces25-May-04 1:20 
QuestionWhen ShowUI Function is called? Pin
Abhi Lahare24-May-04 19:25
Abhi Lahare24-May-04 19:25 
Generalstd::list problem using dll Pin
Wim Jans24-May-04 7:22
Wim Jans24-May-04 7:22 
GeneralRe: std::list problem using dll Pin
Nemanja Trifunovic24-May-04 7:40
Nemanja Trifunovic24-May-04 7:40 
GeneralRe: std::list problem using dll Pin
Wim Jans24-May-04 8:11
Wim Jans24-May-04 8:11 
GeneralRe: std::list problem using dll Pin
Nemanja Trifunovic24-May-04 14:27
Nemanja Trifunovic24-May-04 14:27 
GeneralRe: std::list problem using dll Pin
Michael Dunn24-May-04 11:07
sitebuilderMichael Dunn24-May-04 11:07 
Generallinking a .LIB file with a .DLL Pin
Member 107203224-May-04 3:17
Member 107203224-May-04 3:17 
GeneralRe: linking a .LIB file with a .DLL Pin
Jörgen Sigvardsson24-May-04 7:49
Jörgen Sigvardsson24-May-04 7:49 
GeneralRe: linking a .LIB file with a .DLL Pin
Member 107203224-May-04 21:10
Member 107203224-May-04 21:10 
GeneralRe: linking a .LIB file with a .DLL Pin
Member 107203226-May-04 22:30
Member 107203226-May-04 22:30 
Generallistbox in C# Pin
HowRU21-May-04 20:35
HowRU21-May-04 20:35 
GeneralRe: listbox in C# Pin
Michael Dunn21-May-04 20:50
sitebuilderMichael Dunn21-May-04 20:50 

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.