Error 4 error C2504: 'CYodaGeneralAuditListCtrl' : base class undefined c:\teamyoda\mainline\yoda\accounting\yodaaccountingauditlistctrl.h 15

i am recieving this erro can any one help me in solving it

Recommended Answers

All 7 Replies

Your base class is undefined. Check your spelling, then check to make sure that you're including the appropriate files and have appropriate declarations in place. Your question lacks necessary information to help any further.

Thank you for the reply this is the file which is giving me error

class ACCOUNTING_MYLIB_DECL CYodaAccountingAuditListCtrl : public CYodaGeneralAuditListCtrl  {

public:
                    CYodaAccountingAuditListCtrl ();
    virtual         ~CYodaAccountingAuditListCtrl ();

    CYodaAccountingAuditObject* GetAuditObject (void);

protected:
    virtual void    CreateAuditObject (void);
    virtual CString GetWhereClause (CMelReportParametersArray* = NULL);
    virtual bool    CanAddUserAudit (void) const;
    const CYodaAccountingAuditObject*   GetAuditObject (void) const;

DECLARE_MESSAGE_MAP ()
};

Any One there?

any oneeee

I gave you suggestions, did you apply them? The class you posted doesn't add any useful information.

Is this the entire header file? If so, you will need to #include the header for the base class (as well as <windows.h>, to bring in CString) at the beginning of the file. I would also recommend adding include guards around the file, to prevent multiple definition errors.

A minor note on nomenclature: I assume that 'CYoda' is the name of the package in question, right? I don't know if this is feasible, but it may make more sense for you to have a CYoda namespace, rather than having CYoda prepended to each and every class name. That would at least shorten and simplify the naming, while still having the namespace control that th prepends are apparently meant to provide. I realize that this may not be something you have control over (e.g., if it is a requirement of a company style guide), but I thought it should be mentioned.

What are the macros ACCOUNTING_MYLIB_DECL and DECLARE_MESSAGE_MAP () for, anyway? One should always be careful when working with macros of this sort, especially ones which mark up a declaration in non-standard ways.

I should finally mention that, these fora are not like chat or Twitter, where you can and will get immediate responses most of the time. Different people are in different timezones, and not everyone reading these is likely to respond. It can take several hours to get an answer here, and a quick response is often a sign that your question isn't well worded - you are likely to get a response asking for more information, rather than a meaningful solution. Just something to be aware of.

Thank You soo much for your valuable suggestions :)
solved it :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.