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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:38:38+00:00 2026-05-20T10:38:38+00:00

I have been doing some research about this and have found a few similar

  • 0

I have been doing some research about this and have found a few similar questions on stackoverflow talking about the visibility of types, but this doesn’t seem to be exactly the same problem (or at least that’s what I think after some hours working on it).

Let’s focus:

The problem

C++ compiler reports “abc.cpp:132: error: expected constructor, destructor, or type conversion before ‘*’ token”

The code where the problem is reported

template <class C, class I> ABC<C, I>::Node * ABC<C, I>::buscaTreuIRetornaMinim(Node **node) {
    if (*node == NULL) return NULL;
    if ((*node)->fesq != NULL) return buscaTreuIRetornaMinim(&(*node)->fesq);
    Node *q = *node;
    *node = *node->fdre;
    return q;
}

The problem is reported on the first line, the function header. So far, I understand the problem is when specifying ‘Node *’ but it’s already fully qualified so I don’t see where’s the problem.

The rest of the class definition

class ABC {
public:
    ABC(void) : arrel(NULL), numelements(0), altura(0) { }
    void inserir(C pclau, I pinfo);
    void inordre(void);
    I consultar(C pclau);
    C minim(void);
    C maxim(void);
    void esborrar(C pclau);

private:
    class Node {
    public:
        C clau;
        I info;
        Node *fesq;
        Node *fdre;

        Node(C pclau, I pinfo, Node *pfesq = NULL, Node *pfdre = NULL) : clau(pclau), info(pinfo), fesq(pfesq), fdre(pfdre) { }
    };

    Node *arrel;
    Node *actual;
    int numelements;
    int altura;

    void inserir(C pclau, I pinfo, Node **node);
    void inordre(Node **node);
    I consultar(C pclau, Node **node);
    C minim(Node **node);
    C maxim(Node **node);
    void esborrar(C pclau, Node **node);
    Node * buscaTreuIRetornaMinim(Node **node);
};

On the other hand, I can ensure the rest of the functions are fully functional. That’s the only problem I have dealt with so far.

Any tip will be greatly appreciated. Thanks in advance for your time.

  • 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-20T10:38:38+00:00Added an answer on May 20, 2026 at 10:38 am

    A qualified type name that includes template parameters must be prefixed with the keyword typename : typename ABC<C, I>::Node *

    You can read more about about the necessity of this typename keyword here.

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

Sidebar

Related Questions

I have been doing some research lately about best approaches to authenticating web services
I have been doing some research about how to do custom profileprovider in .NET
I have been doing some research on test driven development and find it pretty
I have been doing some research for using MSMQ. Following 2 gave me fundamental
So I have been doing some research into getting my UTF8 to print correctly.
I love my GUID. However, lately I have been doing some research to understand
I have been doing some research on mobile websites, and thus far it seems
I have been tasked with doing some planning and research for a home grown
I have been doing some research on ID3V2 tags and Video Formats such as
I have been doing some research on genetic algorithms for a project in my

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.