Click here to Skip to main content
16,013,983 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMultiscripting?? Pin
Anonymous9-Mar-04 4:48
Anonymous9-Mar-04 4:48 
AnswerRe: Multiscripting?? Pin
David Crow9-Mar-04 7:02
David Crow9-Mar-04 7:02 
General$500 to $10,000++ if you can decode this.. Pin
Member 9347019-Mar-04 4:22
Member 9347019-Mar-04 4:22 
GeneralRe: $500 to $10,000++ if you can decode this.. Pin
David Crow9-Mar-04 4:51
David Crow9-Mar-04 4:51 
GeneralRe: $500 to $10,000++ if you can decode this.. Pin
Iain Clarke, Warrior Programmer9-Mar-04 8:02
Iain Clarke, Warrior Programmer9-Mar-04 8:02 
GeneralRe: $500 to $10,000++ if you can decode this.. Pin
Prakash Nadar9-Mar-04 4:54
Prakash Nadar9-Mar-04 4:54 
QuestionHow to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 4:09
vgrigor9-Mar-04 4:09 
AnswerRe: How to declare class Member with template declaration ? Pin
Antti Keskinen9-Mar-04 5:32
Antti Keskinen9-Mar-04 5:32 
Your declaration lacks the > and < tags. I believe they were removed by the forum script.

Nevertheless, why do you need to declare members of this class outside of it ? In a class declaration, you can define and declare member functions and data variables all inside the class keyword context, you don't need to create a seperate implementation file.

If, however, you MUST have a seperate implementation file, here is an exerpt from MSDN posing a simple example on how to first declare a template class, then define one member function inside it:
// Template class specification
template <class T, int i>
class TestClass 
{
public:
   char buffer[i];
   T testFunc(T* p1 );
};<DIV>

// Defining a member function
template <class T, int i>
T TestClass<T,i>::testFunc(T* p1) 
{
    return *(p1++);
}
Hope this helps

-Antti Keskinen




----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 5:45
vgrigor9-Mar-04 5:45 
GeneralRe: How to declare class Member with template declaration ? Pin
Robert A. T. Káldy9-Mar-04 5:58
Robert A. T. Káldy9-Mar-04 5:58 
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 6:09
vgrigor9-Mar-04 6:09 
GeneralRe: How to declare class Member with template declaration ? Pin
Robert A. T. Káldy9-Mar-04 6:39
Robert A. T. Káldy9-Mar-04 6:39 
GeneralRe: How to declare class Member with template declaration ? Pin
Antti Keskinen9-Mar-04 6:52
Antti Keskinen9-Mar-04 6:52 
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 20:35
vgrigor9-Mar-04 20:35 
GeneralRe: How to declare class Member with template declaration ? Pin
Robert A. T. Káldy9-Mar-04 23:52
Robert A. T. Káldy9-Mar-04 23:52 
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor10-Mar-04 0:14
vgrigor10-Mar-04 0:14 
GeneralRe: How to declare class Member with template declaration ? Pin
Antti Keskinen9-Mar-04 6:48
Antti Keskinen9-Mar-04 6:48 
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 20:40
vgrigor9-Mar-04 20:40 
GeneralRe: How to declare class Member with template declaration ? Pin
Antti Keskinen9-Mar-04 7:31
Antti Keskinen9-Mar-04 7:31 
GeneralRe: How to declare class Member with template declaration ? Pin
Michael Dunn9-Mar-04 13:10
sitebuilderMichael Dunn9-Mar-04 13:10 
GeneralRe: How to declare class Member with template declaration ? Pin
Antti Keskinen9-Mar-04 20:28
Antti Keskinen9-Mar-04 20:28 
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 20:47
vgrigor9-Mar-04 20:47 
GeneralRe: How to declare class Member with template declaration ? Pin
Robert A. T. Káldy9-Mar-04 23:38
Robert A. T. Káldy9-Mar-04 23:38 
GeneralRe: How to declare class Member with template declaration ? Pin
Antti Keskinen10-Mar-04 0:28
Antti Keskinen10-Mar-04 0:28 
GeneralRe: How to declare class Member with template declaration ? Pin
vgrigor9-Mar-04 20:52
vgrigor9-Mar-04 20:52 

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.