返回首页

今天我转到我的一些代码从VC6到VS2005,我遇到的问题与模板。代码看起来像这样。


  template<BOOL b>

  class CL

  {

     public:

         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);

 }


为VC6的一切都很好,但VS2005有一个返回类型的问题。
  ; 我怎样才能解决呢?

回答

评论会员: 时间:2