Click here to Skip to main content
15,905,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Today I transferred some of my code from vc6 to vs2005 and I encountered a problem with the template. The code looks like this.
 template<BOOL b>
 class CL
        enum etype{ come=0, go, present };
        etype checkType( int iType );

 template<BOOL b>
 CL<b>::etype CL<b>::checkType( int iType )
  if( iType ){
  return CL<b>::etype(iType);

For vc6 everything is fine but vs2005 there is a problem on return type.
How can I solve it?
Updated 26-Oct-11 23:59pm
Richard MacCutchan 27-Oct-11 5:40am    
there is a problem on return type
Where, what problem?
Slacker007 27-Oct-11 6:00am    
Edit: grammar.
Albert Holguin 27-Oct-11 10:59am    
What is the error the compiler is giving you?

1 solution

Are you sure it is not due to the missing semi-colon at the end of your class definition?
Share this answer
Albert Holguin 27-Oct-11 10:59am    
I'm pretty sure a missing semi-colon would have caused an error in studio 6 as well... probably a typo.
Richard MacCutchan 27-Oct-11 11:39am    
I agree but without seeing exactly what the OP is complaining about it's difficult to guess what the problem is.
Albert Holguin 27-Oct-11 12:21pm    
Yep, he needs to provide the compiler error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900