error C2065:'_Ty': undeclared identifier

Posted on 2006-03-19
Last Modified: 2012-06-21
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
  cTimeCode Tc;
  wstring Comment;
  typedef cEvent* Ptr;

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

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

Question by:racineconde
    LVL 12

    Accepted Solution

    >> template<>
    Replace this with
    template<class _Ty>

    Author Comment

    Thanks rajeev. It works perfect...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now