Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3312024
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:56:43+00:00 2026-05-17T21:56:43+00:00

I have this class that will help me with animated meshes. class CAllocateHierarchy: public

  • 0

I have this class that will help me with animated meshes.

class CAllocateHierarchy: public ID3DXAllocateHierarchy
{
public:
    STDMETHOD(CreateFrame)(THIS_ LPCTSTR Name, LPD3DXFRAME *ppNewFrame);
    STDMETHOD(CreateMeshContainer)(THIS_ LPCTSTR Name, LPD3DXMESHDATA pMeshData,
                            LPD3DXMATERIAL pMaterials, LPD3DXEFFECTINSTANCE pEffectInstances, DWORD NumMaterials, 
                            DWORD *pAdjacency, LPD3DXSKININFO pSkinInfo, 
                            LPD3DXMESHCONTAINER *ppNewMeshContainer);
    STDMETHOD(DestroyFrame)(THIS_ LPD3DXFRAME pFrameToFree);
    STDMETHOD(DestroyMeshContainer)(THIS_ LPD3DXMESHCONTAINER pMeshContainerBase);
    CAllocateHierarchy(CMyD3DApplication *pApp) :m_pApp(pApp) {}
public:
    CMyD3DApplication* m_pApp;
};

but when i try to intallizes a class like CAllocateHierarchy allloc(this); i will get error. 16 IntelliSense: object of abstract class type "CAllocateHierarchy" is not allowed: c:\users\owner\documents\visual studio 2010\projects\monopoly\monopoly\monopoly.cpp 186

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:56:43+00:00Added an answer on May 17, 2026 at 9:56 pm

    The error message indicates that you didn’t override all the abstract methods from the interface ID3DXAllocateHierarchy.

    Looking through the arguments, I see that you forgot the “const” for several arguments to the CreateMeshContainer() method. As a result, the C++ compiler thinks this is a different method, and complains that the original CreateMeshContainer() is still abstract.

    From http://msdn.microsoft.com/en-us/library/bb205621(v=VS.85).aspx

    HRESULT CreateMeshContainer(
      [in]           LPCSTR Name,
      [in]           const D3DXMESHDATA *pMeshData,
      [in]           const D3DXMATERIAL *pMaterials,
      [in]           const D3DXEFFECTINSTANCE *pEffectInstances,
      [in]           DWORD NumMaterials,
      [in]           const DWORD *pAdjacency,
      [in]           LPD3DXSKININFO pSkinInfo,
      [out, retval]  LPD3DXMESHCONTAINER *ppNewMeshContainer
    );
    

    So the solution is: Add ‘const’ to several arguments (but see update below).

    Update: You also are missing some ‘*’ in your arguments. Apparently you have declared the CreateMeshContainer to take arguments by value, while it should be by const pointer. Copy-pasting the declaration from the msdn link and removing the [in] tags might be the fastest way to get a correct declaration.

    Suggestion: Using a different compiler might help to generate more insightful error messages, as might setting the warning level as high as possible. Some compilers list the methods that are still abstract. Some compilers might warn that your CreateMeshContainer() is not overriding the virtual CreateMeshContainer() in the interface. Every suggestion what is wrong could be helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that will check for if the class more-results are in
I have class that looks like this: class A { public: class variables_map vm
I have a Handler class that looks like this: class Handler{ public $group; public
I have a .java src file that looks like this: class Test { public
I have this class that have a function to load other classes and create
I have this class that contains vars for db connection; Imports Microsoft.VisualBasic Imports System.Data.SqlClient
I have this class that has many class members, and a lot of different
I have this c# class that calculates n choose k and then generates all
I have this class called PollFrame that extends JFrame in a file called PollFrame.java
I have a class that contains this class method: def self.get_event_record(row, participant) event =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.