Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Modeless Dialogboxes Pin
Christian Graus11-Feb-02 21:29
protectorChristian Graus11-Feb-02 21:29 
GeneralDatabase Pin
vin11-Feb-02 20:49
vin11-Feb-02 20:49 
GeneralRe: Database Pin
Mazdak11-Feb-02 21:07
Mazdak11-Feb-02 21:07 
GeneralRe: Database Pin
vin11-Feb-02 21:16
vin11-Feb-02 21:16 
GeneralCTreeView & CListView Pin
alex.barylski11-Feb-02 19:30
alex.barylski11-Feb-02 19:30 
GeneralRe: CTreeView & CListView Pin
Joaquín M López Muñoz11-Feb-02 21:48
Joaquín M López Muñoz11-Feb-02 21:48 
GeneralRe: CTreeView & CListView Pin
alex.barylski12-Feb-02 9:02
alex.barylski12-Feb-02 9:02 
GeneralManaged C++ Type Independant List Pin
Steve Severance11-Feb-02 19:12
Steve Severance11-Feb-02 19:12 
I am trying to implement a type independant linked list in C++ for use in a C# program. The problem I have is that I have a class ListItemType that holds the data. I need to derive a class from this class in order to hold the lists data. I need to access the members of the derived class with a virtual function that is specifically coded for that class. Is there a way to cast it in C# so that this is possible? Secondly is there a better way to do this? Thanks.




Code follows:
public __gc class ListItem : public Object
{
public:
ListItem(Object *Obj);
void Delete();
bool isUsingSubItems;
int index;

ListItem *pNext;
ListItem *pPrev;
Object *pObject;
};


public __gc class LinkedList
{
public:
LinkedList();

void AddItem(Object *Obj);

Object *FindItem(Object*Obj);//Used to search the root object in each item
virtual Object *FindSubItem(Object *rootObj,Object *Obj) = 0;//Must be
// custom defined each time for the particulars of the list;

Object *GetAt(int index);
int GetIndex(Object *Obj);

void DeleteItem(Object *Obj); //Find a node and delete it
void DeleteList();//delete the whole list

void SetType(Type *type);

int GetNumItems(){return iNumItems;}//
void SetTypeSafe(){bTypeSafe = true;}
bool isTypeSafe(){return bTypeSafe;}
protected:
int iNumItems;
Type *pObjectType;
bool bTypeSafe;


protected:

ListItem *pListHead
ListItem *pListTail;


};

Steve

Not all who wander are lost...
GeneralLooking for a vector graphics library... Pin
11-Feb-02 19:05
suss11-Feb-02 19:05 
GeneralRe: Looking for a vector graphics library... Pin
Rick York11-Feb-02 19:27
mveRick York11-Feb-02 19:27 
QuestionKeyboard Processing without TranslateMessage? Pin
clintsinger11-Feb-02 18:37
clintsinger11-Feb-02 18:37 
AnswerRe: Keyboard Processing without TranslateMessage? Pin
alex.barylski11-Feb-02 18:55
alex.barylski11-Feb-02 18:55 
GeneralRe: Keyboard Processing without TranslateMessage? Pin
Nish Nishant11-Feb-02 19:51
sitebuilderNish Nishant11-Feb-02 19:51 
GeneralRe: Keyboard Processing without TranslateMessage? Pin
alex.barylski12-Feb-02 8:52
alex.barylski12-Feb-02 8:52 
AnswerRe: Keyboard Processing without TranslateMessage? Pin
Nish Nishant11-Feb-02 19:50
sitebuilderNish Nishant11-Feb-02 19:50 
GeneralRe: Keyboard Processing without TranslateMessage? Pin
clintsinger13-Feb-02 15:50
clintsinger13-Feb-02 15:50 
GeneralRe: Keyboard Processing without TranslateMessage? Pin
Nish Nishant13-Feb-02 16:45
sitebuilderNish Nishant13-Feb-02 16:45 
GeneralRe: Keyboard Processing without TranslateMessage? Pin
clintsinger13-Feb-02 20:08
clintsinger13-Feb-02 20:08 
Generalprint out with color syntax Pin
tbbooher11-Feb-02 18:34
tbbooher11-Feb-02 18:34 
GeneralRe: print out with color syntax Pin
alex.barylski11-Feb-02 18:52
alex.barylski11-Feb-02 18:52 
GeneralRe: print out with color syntax Pin
markkuk11-Feb-02 19:50
markkuk11-Feb-02 19:50 
GeneralRe: print out with color syntax Pin
ilinov11-Feb-02 20:40
ilinov11-Feb-02 20:40 
GeneralRe: print out with color syntax Pin
Shog912-Feb-02 5:30
sitebuilderShog912-Feb-02 5:30 
GeneralRe: print out with color syntax Pin
tbbooher12-Feb-02 15:46
tbbooher12-Feb-02 15:46 
GeneralReturn Values, No Pointers Pin
Josh Koppang11-Feb-02 18:16
Josh Koppang11-Feb-02 18:16 

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.