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 a class that looks like this public class SomeClass { public SomeChildClass[]
I have a class that looks like this: public class TextField : TextBox {
I have this code inside a class that is used by an application and
I have a custom class that implements that IComparable. This class is stored in
I have a custom class that implements ICollection , and this class is readonly,
I have two classes, Foo and Bar, that have constructors like this: class Foo
I have a function that looks like this class NSNode { function insertAfter(NSNode $node)
I have a class that contains an array. I want this array to be
I have a class Application that my global.asax inherits from. The class has this
I have a rails model that looks something like this: class Recipe < ActiveRecord::Base

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.