Click here to Skip to main content
16,014,591 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Own wizard... Pin
Michael P Butler1-Jun-02 2:43
Michael P Butler1-Jun-02 2:43 
GeneralRe: Own wizard... Pin
Orkun GEDiK1-Jun-02 12:26
Orkun GEDiK1-Jun-02 12:26 
GeneralRe: Own wizard... Pin
Michael Dunn1-Jun-02 6:10
sitebuilderMichael Dunn1-Jun-02 6:10 
Generalhelp needed::win32 error 10106 Pin
ash250931-May-02 22:15
ash250931-May-02 22:15 
GeneralRe: help needed::win32 error 10106 Pin
Mike Nordell31-May-02 23:47
Mike Nordell31-May-02 23:47 
GeneralRe: help needed::win32 error 10106 Pin
l a u r e n1-Jun-02 2:30
l a u r e n1-Jun-02 2:30 
Generalhelp needed::win32 error 10106 Pin
ash250931-May-02 22:15
ash250931-May-02 22:15 
Generalchar* template parameter [edited] Pin
Paul M Watt31-May-02 21:55
mentorPaul M Watt31-May-02 21:55 
Does any one know how if it is possible, and how to derive from a templatized class that specializes with a specific text string. Here is an example:

template<char* str>
class X
{
void print()
{
cout << "Your initialized Template string is: " << str << endl;
}
};

class Y : public X<"display">
{
...
};

//then instantiate and use the class like so:
Y yDisplay<"display">;
yDisplay.print();

// and here is the output
Your initialized Template string is: display

I can perform this feat with a DWORD. And I can instantiate an X type object that specializes on a text string.

//This seems to work fine.
X xObject<"hello">;

But I cannot figure out if it is possible to derive from a class that has specialized on a particular text string as a template parameter.

Thanks in advance.



Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: char* template parameter [edited] Pin
Michael Dunn31-May-02 22:16
sitebuilderMichael Dunn31-May-02 22:16 
GeneralRe: char* template parameter [edited] Pin
Paul M Watt31-May-02 22:39
mentorPaul M Watt31-May-02 22:39 
GeneralRe: char* template parameter [edited] Pin
Mike Nordell31-May-02 23:52
Mike Nordell31-May-02 23:52 
GeneralRe: char* template parameter [edited] Pin
Paul M Watt1-Jun-02 5:09
mentorPaul M Watt1-Jun-02 5:09 
GeneralRe: char* template parameter [edited] Pin
Joaquín M López Muñoz1-Jun-02 4:33
Joaquín M López Muñoz1-Jun-02 4:33 
GeneralRe: char* template parameter [edited] Pin
Paul M Watt1-Jun-02 5:53
mentorPaul M Watt1-Jun-02 5:53 
GeneralRe: char* template parameter [edited] Pin
Paul M Watt1-Jun-02 5:56
mentorPaul M Watt1-Jun-02 5:56 
QuestionHow to use checkbox? Pin
31-May-02 18:05
suss31-May-02 18:05 
AnswerRe: How to use checkbox? Pin
Ravi Bhavnani31-May-02 18:39
professionalRavi Bhavnani31-May-02 18:39 
AnswerRe: How to use checkbox? Pin
Eugene Pustovoyt31-May-02 21:05
Eugene Pustovoyt31-May-02 21:05 
Generalexport template class in DLL Pin
31-May-02 18:02
suss31-May-02 18:02 
GeneralRe: export template class in DLL Pin
31-May-02 18:10
suss31-May-02 18:10 
GeneralRe: export template class in DLL Pin
Mike Nordell31-May-02 23:56
Mike Nordell31-May-02 23:56 
GeneralRe: export template class in DLL Pin
1-Jun-02 5:28
suss1-Jun-02 5:28 
GeneralRe: export template class in DLL Pin
Mike Nordell1-Jun-02 7:28
Mike Nordell1-Jun-02 7:28 
QuestionI can't use win XP... use which? Pin
tiaozi31-May-02 17:54
tiaozi31-May-02 17:54 
AnswerRe: I can't use win XP... use which? Pin
Ravi Bhavnani31-May-02 18:41
professionalRavi Bhavnani31-May-02 18:41 

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.