Click here to Skip to main content
15,890,282 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDLL Injection Pin
int01h26-Dec-07 14:11
int01h26-Dec-07 14:11 
GeneralRe: DLL Injection Pin
Sarath C26-Dec-07 14:23
Sarath C26-Dec-07 14:23 
GeneralRe: DLL Injection Pin
int01h26-Dec-07 14:30
int01h26-Dec-07 14:30 
GeneralRe: DLL Injection Pin
Naveen26-Dec-07 16:50
Naveen26-Dec-07 16:50 
Questionderiving a non-template class from a template class Pin
Californian226-Dec-07 10:28
Californian226-Dec-07 10:28 
GeneralRe: deriving a non-template class from a template class Pin
CPallini26-Dec-07 11:34
mveCPallini26-Dec-07 11:34 
GeneralRe: deriving a non-template class from a template class Pin
Californian226-Dec-07 12:02
Californian226-Dec-07 12:02 
GeneralRe: deriving a non-template class from a template class Pin
Sarath C26-Dec-07 14:39
Sarath C26-Dec-07 14:39 
You havenot provided any implementation for template base class but for fuction "g".

I dont know the details of implementation but still doubt on the predefined return type (INT) in the template class. You've not using T for any other purpose(except the pointer X).

Anyway the template class generate during compilation and at the time of linking the linker could not find definition for the functions declared for the class. Otherwise you will have to make the virtual function as "pure virtual function".

Are you trying to do something as follows?

<br />
<br />
template <class t=""><br />
class Base<br />
{<br />
public:<br />
    Base();<br />
    virtual ~Base(){};<br />
    virtual T f(){};<br />
    virtual T g(T );<br />
    int n;<br />
    T* x;<br />
};<br />
<br />
template <class t=""><br />
T Base<t>::g(T num)<br />
{<br />
// (code here)<br />
}<br />
<br />
class Derived : public Base<int><br />
{<br />
public:<br />
    Derived() : Base<int>() {};<br />
    Derived(int): Base<int>() {};<br />
    ~Derived(){};<br />
    int h(float){};<br />
};<br />
</int></int></int></t></class></class>


-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin

GeneralRe: deriving a non-template class from a template class Pin
Californian226-Dec-07 14:50
Californian226-Dec-07 14:50 
GeneralRe: deriving a non-template class from a template class Pin
Sarath C26-Dec-07 15:28
Sarath C26-Dec-07 15:28 
GeneralRe: deriving a non-template class from a template class Pin
Californian226-Dec-07 15:59
Californian226-Dec-07 15:59 
GeneralRe: deriving a non-template class from a template class Pin
Sarath C26-Dec-07 16:04
Sarath C26-Dec-07 16:04 
GeneralRe: deriving a non-template class from a template class Pin
Californian227-Dec-07 8:56
Californian227-Dec-07 8:56 
QuestionRe: deriving a non-template class from a template class Pin
Californian226-Dec-07 14:39
Californian226-Dec-07 14:39 
NewsRe: deriving a non-template class from a template class Pin
Californian227-Dec-07 8:51
Californian227-Dec-07 8:51 
GeneralWNetAddConnection returning 487 Pin
Still learning how to code26-Dec-07 10:20
Still learning how to code26-Dec-07 10:20 
AnswerRe: WNetAddConnection returning 487 Pin
Still learning how to code26-Dec-07 11:53
Still learning how to code26-Dec-07 11:53 
Generala very wierd problem Pin
gizmokaka26-Dec-07 10:14
gizmokaka26-Dec-07 10:14 
GeneralRe: a very wierd problem [modified] Pin
Californian226-Dec-07 10:40
Californian226-Dec-07 10:40 
GeneralRe: a very wierd problem Pin
gizmokaka26-Dec-07 11:20
gizmokaka26-Dec-07 11:20 
GeneralRe: a very wierd problem Pin
Californian226-Dec-07 11:33
Californian226-Dec-07 11:33 
GeneralRe: a very wierd problem Pin
CPallini26-Dec-07 22:22
mveCPallini26-Dec-07 22:22 
GeneralRe: a very wierd problem Pin
Luc Pattyn26-Dec-07 16:41
sitebuilderLuc Pattyn26-Dec-07 16:41 
GeneralRe: a very wierd problem Pin
David Crow27-Dec-07 4:28
David Crow27-Dec-07 4:28 
GeneralReceiving data from ListBox in another program. Pin
int01h26-Dec-07 9:31
int01h26-Dec-07 9:31 

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.