Click here to Skip to main content
15,920,005 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
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 
GeneralControls not visible Pin
Skandal21-May-04 8:59
Skandal21-May-04 8:59 
GeneralSTL - map problem Pin
ra_sasi20-May-04 12:21
ra_sasi20-May-04 12:21 
Hi,
I am facing a peculiar problem with usage of maps in the following code

#include <iostream>
#include
#include <deque>
#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) { }
};


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

typedef deque < IEArg > IEOArgList;

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

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

entry p1(IEArg("1234","A"),"Time");
// entry p1("Time",IEArg("1234","A"));
entry p2(IEArg("4567","B"),"Transaction");
// entry p2("Transaction",IEArg("4567","B"));
entry p3(IEArg("5678","C"),"ResultCode");
// entry p3("ResultCode",IEArg("5678","C"));
// Insert values into the phonebook
al.insert(p1);
al.insert(p2);
al.insert(p3);

where = string("Userid='") + "SASI" + string("'");

cout<<"Value of where is "<<where<<endl;

if="" (days=""> 0) {
where += string(" AND ");
where += string("Time >= (CURRENT TIMESTAMP - ");
where += string(days);
where += string(" DAY)");
}


IEArgList::iterator iter;

for (iter = al.begin(); iter != al.end(); iter++) {
cout<<"values are:"<<(*iter).first.name<<":"<<(*iter).first.value<<":"<<(*iter).second<
GeneralRe: STL - map problem Pin
Jörgen Sigvardsson20-May-04 12:35
Jörgen Sigvardsson20-May-04 12:35 
GeneralRe: STL - map problem Pin
ra_sasi21-May-04 4:31
ra_sasi21-May-04 4:31 
GeneralRe: STL - map problem Pin
Paul Ranson21-May-04 7:02
Paul Ranson21-May-04 7:02 
GeneralRe: STL - map problem Pin
ra_sasi21-May-04 7:11
ra_sasi21-May-04 7:11 
GeneralRe: STL - map problem Pin
Paul Ranson21-May-04 7:50
Paul Ranson21-May-04 7:50 
GeneralRe: STL - map problem Pin
ra_sasi21-May-04 11:16
ra_sasi21-May-04 11:16 
GeneralWTL autodelete Pin
AstroDogDog20-May-04 9:57
AstroDogDog20-May-04 9:57 
GeneralRe: WTL autodelete Pin
Jörgen Sigvardsson23-May-04 11:23
Jörgen Sigvardsson23-May-04 11:23 
GeneralRe: WTL autodelete Pin
AstroDogDog23-May-04 11:27
AstroDogDog23-May-04 11:27 
GeneralRe: WTL autodelete Pin
Jörgen Sigvardsson24-May-04 8:01
Jörgen Sigvardsson24-May-04 8:01 
GeneralRe: WTL autodelete Pin
AstroDogDog24-May-04 9:37
AstroDogDog24-May-04 9:37 
GeneralRe: WTL autodelete Pin
Jörgen Sigvardsson24-May-04 10:40
Jörgen Sigvardsson24-May-04 10:40 
GeneralRe: WTL autodelete Pin
AstroDogDog24-May-04 11:07
AstroDogDog24-May-04 11:07 
GeneralRe: WTL autodelete Pin
Jörgen Sigvardsson24-May-04 11:27
Jörgen Sigvardsson24-May-04 11:27 
GeneralRe: WTL autodelete Pin
AstroDogDog24-May-04 11:32
AstroDogDog24-May-04 11:32 
Generalsizeof operator Pin
rohit.dhamija19-May-04 21:34
rohit.dhamija19-May-04 21:34 
GeneralRe: sizeof operator Pin
Michael Dunn20-May-04 5:26
sitebuilderMichael Dunn20-May-04 5:26 

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.