Click here to Skip to main content
15,898,978 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why I can't use one more CBUTTON variable Pin
yeetins23-May-05 4:44
yeetins23-May-05 4:44 
GeneralRe: Why I can't use one more CBUTTON variable Pin
BlackDice23-May-05 5:10
BlackDice23-May-05 5:10 
QuestionInheritance? Pin
Bob Stanneveld23-May-05 2:43
Bob Stanneveld23-May-05 2:43 
AnswerRe: Inheritance? Pin
GDavy23-May-05 3:19
GDavy23-May-05 3:19 
GeneralRe: Inheritance? Pin
Bob Stanneveld23-May-05 3:50
Bob Stanneveld23-May-05 3:50 
AnswerRe: Inheritance? Pin
Ryan Binns23-May-05 3:58
Ryan Binns23-May-05 3:58 
GeneralRe: Inheritance? Pin
Bob Stanneveld23-May-05 6:04
Bob Stanneveld23-May-05 6:04 
AnswerRe: Inheritance? Pin
S. Senthil Kumar23-May-05 5:25
S. Senthil Kumar23-May-05 5:25 
The problem has nothing to do with templates. It's because OtherClass's DoFoo override hides the base class's DoFoo(Type0, int). Just adding
class OtherClass : public SomeClass<A, B>
{
public:
   using SomeClass<int,int>::DoFoo;
   virtual bool DoFoo(Type0 nParam1) { }
};

solves the problem. The using statement brings all DoFoo overloads of SomeClass into OtherClass's "namespace", so it works fine. This problem occurs whenever you have overloaded virtual methods in the base class and you're selectively overriding them in the derived class.

Caught me on the wrong foot too, I was suspecting template instantiation problems Smile | :) .

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: Inheritance? Pin
Bob Stanneveld23-May-05 20:14
Bob Stanneveld23-May-05 20:14 
GeneralRadio Button Pin
alvarillo23-May-05 2:31
alvarillo23-May-05 2:31 
GeneralRe: Radio Button Pin
David Crow23-May-05 4:39
David Crow23-May-05 4:39 
GeneralRemoving Items From A Listbox Pin
[d3m0n]23-May-05 2:26
[d3m0n]23-May-05 2:26 
GeneralRe: Removing Items From A Listbox Pin
Tom Archer23-May-05 2:31
Tom Archer23-May-05 2:31 
GeneralRe: Removing Items From A Listbox Pin
[d3m0n]23-May-05 2:54
[d3m0n]23-May-05 2:54 
GeneralRe: Removing Items From A Listbox Pin
Tom Archer23-May-05 2:58
Tom Archer23-May-05 2:58 
GeneralRe: Removing Items From A Listbox Pin
ThatsAlok23-May-05 3:03
ThatsAlok23-May-05 3:03 
GeneralRe: Removing Items From A Listbox Pin
[d3m0n]23-May-05 3:08
[d3m0n]23-May-05 3:08 
GeneralRe: Removing Items From A Listbox Pin
lynchspawn23-May-05 4:11
lynchspawn23-May-05 4:11 
GeneralRe: Removing Items From A Listbox Pin
Jack Puppy23-May-05 4:06
Jack Puppy23-May-05 4:06 
GeneralRe: Removing Items From A Listbox Pin
[d3m0n]23-May-05 4:23
[d3m0n]23-May-05 4:23 
GeneralRe: Removing Items From A Listbox Pin
David Crow23-May-05 4:43
David Crow23-May-05 4:43 
GeneralRe: Removing Items From A Listbox Pin
[d3m0n]23-May-05 4:46
[d3m0n]23-May-05 4:46 
GeneralRe: Removing Items From A Listbox Pin
David Crow23-May-05 5:03
David Crow23-May-05 5:03 
GeneralRe: Removing Items From A Listbox Pin
[d3m0n]23-May-05 5:07
[d3m0n]23-May-05 5:07 
GeneralRe: Removing Items From A Listbox Pin
David Crow23-May-05 5:27
David Crow23-May-05 5:27 

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.