CList problem
- From: "Z.K." <nospam@xxxxxxxxxx>
- Date: Tue, 15 May 2007 06:57:23 -0700
Can some tell me how to use a CList with a struct data type? As it is this
seems to work fine, but I can't seem to figure out how to access the data in
the struct in the list such age and name from the list. Can someone give me
a clue. I thought using CList would be easier and faster than implementing
a standard Linklist using C++ pointers, but maybe that was a mistake on my
part since I can't seem to make this work.
Z.K.
struct PERSON
{
int age;
CString name;
}
PERSON tom;
tom.age = 27;
tom.name = "Thomas";
CList<PERSON, PERSON> list;
POSITION pos = list.AddHead(tom);
.
- Prev by Date: Re: struct values and VC++/MFC
- Next by Date: Re: struct values and VC++/MFC
- Previous by thread: struct values and VC++/MFC
- Next by thread: VC6 reports Error spawning xicl6.exe
- Index(es):
Relevant Pages
|