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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:14:47+00:00 2026-06-06T12:14:47+00:00

I have a function definition of the following form (within a large code): class

  • 0

I have a function definition of the following form (within a large code):

class Abc{
 public:
 bool func(const std::string& text,::DE::d type,unsigned a,unsigned& b);
 };

Here DE is a class of the following form:

class DE
{
   public:
   enum d{U,L};

};

Now I am calling the function in the following form:

string s;
unsigned st=0;
int idj;
cout<<"\n Enter the value of string:";
cin>>s;
Abc abc;
abc.func(s,DE::U, 0,  idj); 
cout<<idj;

Upon the call of the function func in abc.func(s,DE::U, 0, idj); I am getting the below mentioned error. Can someone be kind enough to help find and rectify the error.

The error that I am getting is:

   error: no matching function for call to ‘Abc::func(std::string&, DE::U, unsigned int&, int&)’
  • 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-06-06T12:14:50+00:00Added an answer on June 6, 2026 at 12:14 pm

    You should read about access specifiers.

    class Abc{
     bool func(const std::string& text,::DE::d type,unsigned a,unsigned& b);
    };
    

    Abc::func() is private, so cannot be called, or referenced, from outside. Same with enum in DE.

    Plus, you cannot pass int, where reference to unsigned int is required.

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

Sidebar

Related Questions

I have a function with the following definition: virtual bool Process(wtdaFileHandler &daHandler, wtdaGather &daGather);
I have following preprocessor (code) block in my project before each function definition to
I have the following C++ function definition, which I am trying to call through
I have a RegistrationFormType with following validation constraints: public function getDefaultOptions(array $options) { $collectionConstraint
I was using multithreading in my window form. Following is my class. I have
I have code in the following form in which the user may specify a
I have the following action for a form. In the MyForm definition, I added
Consider I have the following function prototype: void MyFunction(int MyParameter); With the following definition:
Below is a function from JQueryTools and I have never seen the following definition
I have the following code which works as expected: #include <iostream> using namespace std;

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.