Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Collection Class Question Pin
Christian Graus13-Mar-02 11:24
protectorChristian Graus13-Mar-02 11:24 
GeneralRe: Collection Class Question Pin
Joaquín M López Muñoz13-Mar-02 11:31
Joaquín M López Muñoz13-Mar-02 11:31 
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 11:37
CDuddley13-Mar-02 11:37 
GeneralRe: Collection Class Question Pin
Joaquín M López Muñoz13-Mar-02 11:44
Joaquín M López Muñoz13-Mar-02 11:44 
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 11:52
CDuddley13-Mar-02 11:52 
GeneralRe: Collection Class Question Pin
Christian Graus13-Mar-02 12:04
protectorChristian Graus13-Mar-02 12:04 
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 12:14
CDuddley13-Mar-02 12:14 
GeneralRe: Collection Class Question Pin
Joaquín M López Muñoz13-Mar-02 12:19
Joaquín M López Muñoz13-Mar-02 12:19 
If I'm getting your point now, what you need to do is having CStuff derive from CObject:
class CStuff: public CObject
{
... // as before
};
Now say your list of CStuffs is called (in a fit of originality) stuffList. So, to enter a new object (up to 100, if that's your wish) you just write:
stuffList.AddTail(new CStuff(/*args here if ctor needs them */));
Hope this is what you were after. Please tell us if it is not.

As for the STL stuff, do not be frightened by its rather awesome aspect. In fact, having a std::list of CStuffs is no harder than with CObList (and you won't have to derive from CObject):
std::list<CStuff> stuffList;
...
stuffList.push_back(CStuff()); // no new here, we store objects rather than pointers to them


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 14:19
CDuddley13-Mar-02 14:19 
GeneralRe: Collection Class Question Pin
Tim Smith13-Mar-02 11:38
Tim Smith13-Mar-02 11:38 
GeneralWM_GETMINMAXINFO Pin
13-Mar-02 10:55
suss13-Mar-02 10:55 
GeneralRe: WM_GETMINMAXINFO Pin
Derek Waters13-Mar-02 11:33
Derek Waters13-Mar-02 11:33 
GeneralRe: WM_GETMINMAXINFO Pin
13-Mar-02 11:43
suss13-Mar-02 11:43 
GeneralRe: WM_GETMINMAXINFO Pin
Tim Smith13-Mar-02 11:42
Tim Smith13-Mar-02 11:42 
GeneralVC++ in Visual Studio.NET Pin
Rick Crone13-Mar-02 10:36
Rick Crone13-Mar-02 10:36 
GeneralRe: VC++ in Visual Studio.NET Pin
Bill Wilson13-Mar-02 14:24
Bill Wilson13-Mar-02 14:24 
GeneralRe: VC++ in Visual Studio.NET Pin
Rick Crone14-Mar-02 2:59
Rick Crone14-Mar-02 2:59 
GeneralRe: VC++ in Visual Studio.NET Pin
Bill Wilson14-Mar-02 6:16
Bill Wilson14-Mar-02 6:16 
GeneralRe: VC++ in Visual Studio.NET Pin
Rick Crone14-Mar-02 9:19
Rick Crone14-Mar-02 9:19 
GeneralRe: VC++ in Visual Studio.NET Pin
Bill Wilson14-Mar-02 9:55
Bill Wilson14-Mar-02 9:55 
GeneralRe: VC++ in Visual Studio.NET Pin
Rick Crone14-Mar-02 10:27
Rick Crone14-Mar-02 10:27 
GeneralRe: VC++ in Visual Studio.NET Pin
Bill Wilson14-Mar-02 12:18
Bill Wilson14-Mar-02 12:18 
QuestionAnybody has it???? Pin
Jay!13-Mar-02 9:26
Jay!13-Mar-02 9:26 
GeneralTapi32.DLL weirdness Pin
#realJSOP13-Mar-02 9:02
professional#realJSOP13-Mar-02 9:02 
GeneralRe: Tapi32.DLL weirdness Pin
Tim Deveaux13-Mar-02 10:46
Tim Deveaux13-Mar-02 10:46 

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.