0

I have this following code:

    ///////////////////////////////////////////////////////////////////////////////
template  <class Items>  void
    typename KernelT<Items>::
    _fix_halfedge_order(const HalfedgeHandle& _hh0, const HalfedgeHandle& _hh1) {
        //����������õ�������̰�ߵ���Ϊ�����ڽӹ�ϵ;  ����: ������̵İ�ߺ�
        HalfedgeHandle  fore_begin,          fore_end(_hh0);
        HalfedgeHandle  this_begin(_hh1),    this_end;
        HalfedgeHandle  back_begin(next_halfedge_handle(_hh0));
        HalfedgeHandle  back_end  (prev_halfedge_handle(_hh1));

And Visual Studio is complaining that: 'typename' may not be specified here (C/C++).

It's a small library when I try to build it with g++ tons of errors, gcc should work according to authors, but I am getting this error..

n. m. could be an AI
  • 112,515
  • 14
  • 128
  • 243
  • 2
    There exists no such thing as "C/C++". This is clearly C++. Are you compiling it as C or what? Because that would explain your problems. – Lundin May 17 '22 at 08:55
  • 2
    First of all where did you get this code from? What are you supposed to do with it? Are you sure you haven't fallen into a [cargo cult programming](https://en.wikipedia.org/wiki/Cargo_cult_programming) trap? And also remember that C and C++ are two *Very* different languages, the code you show is C++ and not valid C. – Some programmer dude May 17 '22 at 08:55
  • For more helpful responses in future be sure to provide a [mre] and the full compiler output – Alan Birtles May 17 '22 at 09:25
  • The code as shown is invalid and we can't fix it because it is too small of a fragment. You need to ask the author of the code. For this particular error, try removing `typename`, but no guarantees. – n. m. could be an AI May 17 '22 at 10:04

0 Answers0