Click here to Skip to main content
15,906,106 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralATL problem Pin
novachen17-Aug-03 1:52
novachen17-Aug-03 1:52 
GeneralRe: ATL problem Pin
Jörgen Sigvardsson17-Aug-03 5:01
Jörgen Sigvardsson17-Aug-03 5:01 
GeneralRe: ATL problem Pin
novachen17-Aug-03 14:41
novachen17-Aug-03 14:41 
GeneralRe: ATL problem Pin
Jörgen Sigvardsson17-Aug-03 22:40
Jörgen Sigvardsson17-Aug-03 22:40 
GeneralRe: ATL problem Pin
peterchen17-Aug-03 6:58
peterchen17-Aug-03 6:58 
GeneralRe: ATL problem Pin
novachen17-Aug-03 14:40
novachen17-Aug-03 14:40 
GeneralRe: ATL problem Pin
peterchen17-Aug-03 23:15
peterchen17-Aug-03 23:15 
GeneralProblems with inheritance Pin
petter_e16-Aug-03 22:14
petter_e16-Aug-03 22:14 
Sorry if I waste some bytes on this forum now, but I can't
get this to work as i thought it would.. My questions are:

1) Why don't the DerivedList1 and DerivedList2 seem to
inherit the count() and the two get_instance()-methods?
For me, they don't pop up in under the classes in the
"Class view"-tab.

and...

2) ..what must I do to make them Big Grin | :-D So maybe just an an-
swer to the first question will be enough.

Code goes here
-------------------------------------------
#ifndef MY_HFILE_H
#define MY_HFILE_H

#include <list>
using std::list;
#include <string>
using std::string;

class Class1;	// defined elsewhere
class Class2;	// defined elsewhere

template<class T>
class GenList : public list<T*> {  // a list (of pointers) with some extra methods
public:
	virtual string to_string(Class1* receiveObj, bool check=true);
	int count(string key);
	bool get_instance(int nr, T* dest, int& instance_nr);
	bool get_instance(string key, T* dest, int& instance_nr);
};

class DerivedList1 : public GenList<Class1> {
public:
	string to_string(Class1* receiveObj, bool check=true);	
};

class DerivedList2 : public GenList<Class2> {
public:
	string to_string(Class1* receiveObj, bool check=true);
};

#endif // #ifndef MY_HFILE_H

-------------------------------------------

Thank you for any input on this
/P
GeneralRe: Problems with inheritance Pin
Ryan Binns16-Aug-03 23:35
Ryan Binns16-Aug-03 23:35 
GeneralRe: Problems with inheritance Pin
Jörgen Sigvardsson17-Aug-03 5:03
Jörgen Sigvardsson17-Aug-03 5:03 
GeneralRe: Problems with inheritance Pin
Ryan Binns17-Aug-03 5:41
Ryan Binns17-Aug-03 5:41 
GeneralRe: Problems with inheritance Pin
petter_e17-Aug-03 6:22
petter_e17-Aug-03 6:22 
GeneralCDaoDatabase Open Jet Database Crashing Pin
John Clump16-Aug-03 18:49
John Clump16-Aug-03 18:49 
GeneralRe: CDaoDatabase Open Jet Database Crashing Pin
Terry O'Nolley17-Aug-03 17:48
Terry O'Nolley17-Aug-03 17:48 
GeneralWM_ERASEBKGND Pin
Hosam Aly Mahmoud16-Aug-03 17:42
Hosam Aly Mahmoud16-Aug-03 17:42 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns16-Aug-03 19:53
Ryan Binns16-Aug-03 19:53 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud16-Aug-03 23:12
Hosam Aly Mahmoud16-Aug-03 23:12 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns16-Aug-03 23:30
Ryan Binns16-Aug-03 23:30 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud16-Aug-03 23:52
Hosam Aly Mahmoud16-Aug-03 23:52 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 0:16
Ryan Binns17-Aug-03 0:16 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud17-Aug-03 1:28
Hosam Aly Mahmoud17-Aug-03 1:28 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 5:48
Ryan Binns17-Aug-03 5:48 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud17-Aug-03 11:42
Hosam Aly Mahmoud17-Aug-03 11:42 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 15:16
Ryan Binns17-Aug-03 15:16 
GeneralRe: WM_ERASEBKGND Pin
J. Dunlap17-Aug-03 15:37
J. Dunlap17-Aug-03 15:37 

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.