Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Ok so maybe this C++ stuff is ok...
I've been playing with the STL..really neat to be able to create dynamic arrays, dictionaries, and linked lists!!! with a couple a lines of code. It's the linked list I have a question about. I'm trying to maintain "ordered maps" if you will using the list template. I have it working by creating a class to associate the two things (a date, and a recordnumber). I think I may have overkilled the class (I created ALL the operators). Any suggestions for a 'bare bones' class that will work with list template?.. Another question: any way to force the automatic sorting of lists? Another question: I'm creating record struct pointers on the fly. Basically read in the whole file creating dynamic structs and storing the addresses in a vector...I have a feeling that when I hack this into the MFC doc class I'm going to get burned by this...just can't think of how. Another question: Could I create a vector of lists... struct DataRecord { int RecordNumber; char Task[256]; char DueDate[10]; char Priority[2]; int Completed; char Notes[2048]; int Deleted; } ; vector<struct DataRecord * > MyStuff; // my data file goes in here list<int > OrderByRecordNumber; // simply walk through in order list<DateOrder > OrderByDate; // walk through by due date list<PriorityOrder > OrderByPriority: // walk through by priority vector <list > MyDisplaySorts; // this is the question... I'd like to simply set a flag and automagically use the right list for my sorting... Any input would be appreciated... Thanks Michael Jul 01 2002
On Mon, 01 Jul 2002 14:42:14 -0400 Michael Comperchio <mcmprch adelphia.net> wrote:I've been playing with the STL..really neat to be able to create dynamic arrays, dictionaries, and linked lists!!! with a couple a lines of code. It's the linked list I have a question about. I'm trying to maintain "ordered maps" if you will using the list template. I have it working by creating a class to associate the two things (a date, and a recordnumber). I think I may have overkilled the class (I created ALL the operators). Any suggestions for a 'bare bones' class that will work with list template?.. Jul 01 2002
Pavel Minayev wrote:On Mon, 01 Jul 2002 14:42:14 -0400 Michael Comperchio <mcmprch adelphia.net> wrote:I've been playing with the STL..really neat to be able to create dynamic arrays, dictionaries, and linked lists!!! with a couple a lines of code. It's the linked list I have a question about. I'm trying to maintain "ordered maps" if you will using the list template. I have it working by creating a class to associate the two things (a date, and a recordnumber). I think I may have overkilled the class (I created ALL the operators). Any suggestions for a 'bare bones' class that will work with list template?.. Jul 01 2002
Michael Comperchio wrote:I've been playing with the STL..really neat to be able to create dynamic arrays, dictionaries, and linked lists!!! with a couple a lines of code. It's the linked list I have a question about. I'm trying to maintain "ordered maps" if you will using the list template. I have it working by creating a class to associate the two things (a date, and a recordnumber). I think I may have overkilled the class (I created ALL the operators). Any suggestions for a 'bare bones' class that will work with list template?.. Another question: any way to force the automatic sorting of lists? Jul 01 2002
|