• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 786
  • Last Modified:

error C2065:'_Ty': undeclared identifier

When I try to compile my code written in C++ .NET, I get the error message in the title of the question.

Here's the code I can't compile (I've put the following comment in front of the "wrong" line
//999 ->Here's the line incriminated!!!
to help you identify the line that doesn't compile...

Is someone has ant idea??? (Thanks in advance...)

//*********************
#include "resource.h"
#include "cTimeCode.h"

class cEvent
{
private:
  cTimeCode Tc;
  wstring Comment;
public:
  typedef cEvent* Ptr;

  cEvent();
  virtual ~cEvent();

  void set(cTimeCode tc,wstring comment);
  void print();

  cTimeCode tc();
  wstring comment();

  void createComment(
    cUnknownPtr<IAAFDictionary> pDictionary,
    cUnknownPtr<IAAFDataDef> pDataDef,
    cUnknownPtr<IAAFSequence> pSequence);
};

template<>
struct std::greater<cEvent::Ptr> : binary_function<_Ty, _Ty, bool> //999 ->Here's the line incriminated!!!
{
  bool operator()(const _Ty& x, const _Ty& y) const
  {
    return y->tc() > x->tc();
  }
};


//*******************
0
racineconde
Asked:
racineconde
1 Solution
 
rajeev_devinCommented:
>> template<>
Replace this with
template<class _Ty>
0
 
racinecondeAuthor Commented:
Thanks rajeev. It works perfect...

Racine
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now