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

C / C++ / MFC

 
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 
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 
Well, you have a point with my misuse of vocabulary on the problem.

However if I want to instnatiate class X with a string parameter, the method that you have suggested will not work. If you read the link that Mike Dunn posted above, you need to create a variable with external linkage in order for the template to be able to use it. Here is a summary.

#define FOO_DEFINE "foo"

X xObject1<"foo">; //will not work
X xObject2<foo_define> //will not work either, same as xObject<"foo">

char FOO_STR[] = "foo";
X xObject3<foo_str>; //THe correct way to do it.

Anyway my real problem is that I want to derive a class Y from a specialized version of X, like so:

class Y : public X<foo_str>
{

};

class Y is not a parameterized class, however it will use a special version of X.

Thanks again.


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
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 
AnswerRe: I can't use win XP... use which? Pin
Paul M Watt31-May-02 18:53
mentorPaul M Watt31-May-02 18:53 
GeneralRe: I can't use win XP... use which? Pin
tiaozi31-May-02 20:37
tiaozi31-May-02 20:37 
AnswerRe: I can't use win XP... use which? Pin
Michael P Butler31-May-02 23:00
Michael P Butler31-May-02 23:00 
GeneralRe: I can't use win XP... use which? Pin
Mark A31-May-02 23:35
Mark A31-May-02 23:35 

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.