Click here to Skip to main content
15,901,122 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questioninterview questions on ATL COM Pin
pathakr21-Jul-06 3:49
pathakr21-Jul-06 3:49 
QuestionHope this works ! Pin
nvatia21-Jul-06 3:41
nvatia21-Jul-06 3:41 
AnswerRe: Hope this works ! Pin
Stephen Hewitt21-Jul-06 4:04
Stephen Hewitt21-Jul-06 4:04 
GeneralRe: Hope this works ! Pin
nvatia21-Jul-06 4:12
nvatia21-Jul-06 4:12 
AnswerRe: Hope this works ! Pin
Stephen Hewitt21-Jul-06 4:18
Stephen Hewitt21-Jul-06 4:18 
GeneralRe: Hope this works ! Pin
nvatia21-Jul-06 5:14
nvatia21-Jul-06 5:14 
GeneralRe: Hope this works ! Pin
Stephen Hewitt21-Jul-06 18:12
Stephen Hewitt21-Jul-06 18:12 
GeneralRe: Hope this works ! [modified] Pin
Zac Howland25-Jul-06 5:57
Zac Howland25-Jul-06 5:57 
typename and class are interchangible when dealing with templates. That is, in that case, they mean the exact same thing.

Hmm, hit pre and it posted it. Anyway, the following should work (don't have Visual Studio on this box, so I can't test it to be sure):

template<class TYPE, class ARG_TYPE>
class CBanana : public CObject
{
protected:
    struct CApple
    {
        int x;
        int y;
    };

    int GetInt(int);
    CApple* GetApple(CApple*);
};

template<class TYPE, class ARG_TYPE>
int CBanana<TYPE, ARG_TYPE>::GetInt(int i)
{
    return i;
}

template<class TYPE, class ARG_TYPE>
CBanana<TYPE, ARG_TYPE>::CApple*
CBanana<TYPE, ARG_TYPE>::GetApple(CBanana<TYPE, ARG_TYPE>::CApple* pApple)
{
    return pApple;
}


You shouldn't need the typename specifier in the method signature (though, it won't necessarily hurt it, it can make the code a bit less readable).



-- modified at 12:12 Tuesday 25th July, 2006
GeneralRe: Hope this works ! Pin
Stephen Hewitt26-Jul-06 2:09
Stephen Hewitt26-Jul-06 2:09 
GeneralRe: Hope this works ! Pin
Zac Howland26-Jul-06 3:41
Zac Howland26-Jul-06 3:41 
QuestionTemplates compile error - errata 2 Pin
nvatia21-Jul-06 3:29
nvatia21-Jul-06 3:29 
AnswerRe: Templates compile error - errata 2 Pin
toxcct25-Jul-06 21:24
toxcct25-Jul-06 21:24 
QuestionTemplate compile error - errata Pin
nvatia21-Jul-06 3:26
nvatia21-Jul-06 3:26 
AnswerRe: Template compile error - errata Pin
prasad_som21-Jul-06 3:37
prasad_som21-Jul-06 3:37 
QuestionTemplates compile error Pin
nvatia21-Jul-06 3:23
nvatia21-Jul-06 3:23 
QuestionATL WTL STL Pin
mathumala21-Jul-06 3:11
mathumala21-Jul-06 3:11 
AnswerRe: ATL WTL STL Pin
toxcct21-Jul-06 3:22
toxcct21-Jul-06 3:22 
GeneralRe: ATL WTL STL Pin
Zac Howland25-Jul-06 10:11
Zac Howland25-Jul-06 10:11 
Questionsafearray access returns junk pls help Pin
nikhil_ag198520-Jul-06 1:52
nikhil_ag198520-Jul-06 1:52 
Questionneed ATL???for login to server and access data Pin
With_problem19-Jul-06 21:40
With_problem19-Jul-06 21:40 
AnswerRe: need ATL???for login to server and access data Pin
Steve S19-Jul-06 21:50
Steve S19-Jul-06 21:50 
GeneralRe: need ATL???for login to server and access data Pin
With_problem19-Jul-06 22:12
With_problem19-Jul-06 22:12 
GeneralRe: need ATL???for login to server and access data Pin
Steve S19-Jul-06 22:24
Steve S19-Jul-06 22:24 
QuestionC# BHO question Pin
elefas19-Jul-06 3:15
elefas19-Jul-06 3:15 
QuestionProperty page loading to FireFox Browser. Pin
shivditya19-Jul-06 3:04
shivditya19-Jul-06 3:04 

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.