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 6992615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:39:28+00:00 2026-05-27T19:39:28+00:00

My compiler says: error C2660: ‘UberMaterial::Initialize’ : function does not take 2 arguments When

  • 0

My compiler says:

error C2660: 'UberMaterial::Initialize' : function does not take 2 arguments

When I write this:

#include "BaseMaterial.h"
#include "UberMaterial.h"

UberMaterial* m_pGameLevelMaterial;
m_pGameLevelMaterial->Initialize(m_pContentManager, m_pLevel->GetDevice());

The base class:

class BaseMaterial
{
public:
BaseMaterial(tstring shaderFilename);
virtual ~BaseMaterial(){}

void Initialize(ContentManager *pContentManager, ID3D10Device *pD3DDevice);
//[More Code...]

protected:
    virtual void Initialize(ContentManager *pContentManager) = 0;
//[More Code...]
};

The inherited class:

#include "BaseMaterial.h"
class UberMaterial:public BaseMaterial
{
//[More Code...]
protected:
    virtual void Initialize(ContentManager *pContentManager);
//[More Code...]
};

Can anyone tell me what the problem is?

If you need more code, just comment and I’ll post it. But the whole thing is rather large, so I didn’t include it at this point.

  • 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-27T19:39:29+00:00Added an answer on May 27, 2026 at 7:39 pm

    Yes, by default, an overload in a derived class will hide a different overload from a base class. You can re-expose the base-class overload with using:

    class UberMaterial : public BaseMaterial
    {
        ...
    
    public:
        using BaseMaterial::Initialize;
    
        virtual void Initialize(ContentManager *pContentManager);
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Compiler Error Keyword 'this' is not available in the current context delegate void CallBack(int
Why does the following not compile? It says error: expected primary-expression before ‘>’ token.
Why does this not compile? File.hpp class CTest { public: enum enumTest { EN_TEST
Why I can't do this? compiler says warning C4832: token '.' is illegal after
using the g95 compiler, I get an error that says: ERROR: Procedure attribute conflicts
When i use this string as a sql command-string compiler gives me no error:
This code works with clang but g++ says: error: ‘A::A()’ is protected class A
Anyone have a link to what the C++ standard says regarding a compiler removing
Compiler error CS0283 indicates that only the basic POD types (as well as strings,
The compiler doesn't know where stat.h is? Error: c:\Projects\ADC_HCI\mongoose.c(745) : error C2079: 'st' uses

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.