Click here to Skip to main content
15,903,632 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Deque's question Pin
Emilio Guijarro29-Aug-02 6:24
Emilio Guijarro29-Aug-02 6:24 
GeneralRe: Deque's question Pin
Christian Graus28-Aug-02 13:24
protectorChristian Graus28-Aug-02 13:24 
GeneralSTL: keep order for map Pin
peterchen27-Aug-02 19:38
peterchen27-Aug-02 19:38 
GeneralRe: STL: keep order for map Pin
Todd Smith27-Aug-02 20:06
Todd Smith27-Aug-02 20:06 
GeneralRe: STL: keep order for map Pin
peterchen27-Aug-02 20:59
peterchen27-Aug-02 20:59 
GeneralRe: STL: keep order for map Pin
Todd Smith27-Aug-02 21:13
Todd Smith27-Aug-02 21:13 
GeneralRe: STL: keep order for map Pin
peterchen27-Aug-02 21:49
peterchen27-Aug-02 21:49 
GeneralRe: STL: keep order for map Pin
Joaquín M López Muñoz28-Aug-02 12:26
Joaquín M López Muñoz28-Aug-02 12:26 
Why does the lookup need to be based on string comparison? If you just want fast lookup preserving the order of insertion, try using this class as the key of your map this:
class seq_string
{
public:
    seq_string(const char *str):str(str),count(total_count++){}
    seq_string(const std::string& str):str(str),count(total_count++){}
    seq_string(const seq_string& r):str(str),count(total_count++){}
    operator const char *()const{return str.c_str();}
    operator const std::string&()const{return str;}
    bool operator <(const seq_string& r)const{return count<r.count;}
private:
    std::string         str;
    unsigned int        count;
    static unsigned int total_count;
};
...
unsigned int seq_string::total_count=0;



Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: STL: keep order for map Pin
peterchen28-Aug-02 12:53
peterchen28-Aug-02 12:53 
GeneralATL server exe and event interface Pin
_elli_26-Aug-02 23:14
_elli_26-Aug-02 23:14 
GeneralDeque Pin
danag26-Aug-02 11:32
danag26-Aug-02 11:32 
GeneralRe: Deque Pin
danag26-Aug-02 12:14
danag26-Aug-02 12:14 
GeneralWindows service in ATL Pin
rajeev25-Aug-02 20:31
rajeev25-Aug-02 20:31 
GeneralRe: Windows service in ATL Pin
Vagif Abilov31-Aug-02 21:20
professionalVagif Abilov31-Aug-02 21:20 
QuestionDrag & Drop into a CWindowImpl? Pin
clintsinger23-Aug-02 12:43
clintsinger23-Aug-02 12:43 
AnswerRe: Drag & Drop into a CWindowImpl? Pin
Michael Dunn25-Aug-02 21:34
sitebuilderMichael Dunn25-Aug-02 21:34 
GeneralWTL FormBased APP with AX Pin
obt23-Aug-02 11:26
obt23-Aug-02 11:26 
GeneralProperty Sheet Wizard Pin
mango_lier22-Aug-02 9:42
mango_lier22-Aug-02 9:42 
GeneralCreateThread / CloseHandle cleanly Pin
Paul Farry22-Aug-02 5:14
professionalPaul Farry22-Aug-02 5:14 
GeneralRe: CreateThread / CloseHandle cleanly Pin
_Magnus_22-Aug-02 5:18
_Magnus_22-Aug-02 5:18 
GeneralRe: CreateThread / CloseHandle cleanly Pin
Paul Farry22-Aug-02 5:29
professionalPaul Farry22-Aug-02 5:29 
Generalset compiler error Pin
_Magnus_22-Aug-02 3:43
_Magnus_22-Aug-02 3:43 
GeneralRe: set compiler error Pin
Michael Dunn25-Aug-02 21:32
sitebuilderMichael Dunn25-Aug-02 21:32 
GeneralSTL Container of classes Pin
[James Pullicino]21-Aug-02 21:39
[James Pullicino]21-Aug-02 21:39 
GeneralRe: STL Container of classes Pin
Anonymous21-Aug-02 22:07
Anonymous21-Aug-02 22:07 

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.