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

  • Home
  • SEARCH
  • 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 6686909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:13:35+00:00 2026-05-26T05:13:35+00:00

#include PQueue.h struct arcT; struct coordT { double x, y; }; struct nodeT {

  • 0
#include "PQueue.h"

struct arcT;

struct coordT {
    double x, y;
};

struct nodeT {
    string name;
    coordT* coordinates;
    PQueue<arcT *> outgoing_arcs;
};

struct arcT {
    nodeT* start, end;
    int weight;
};

int main(){
    nodeT* node = new nodeT; //gives error, there is no constructor
}

My purpose is to create a new nodeT in heap. Error is:

error C2512: ‘nodeT’ : no appropriate default constructor available

  • 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-26T05:13:36+00:00Added an answer on May 26, 2026 at 5:13 am

    PQueue<arcT *> does not have an appropriate default constructor, so a default constructor for nodeT cannot be generated by the compiler. Either make an appropriate default constructor for PQueue<arcT *> or add a user-defined default constructor for nodeT which constructs outgoing_arcs appropriately.

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

Sidebar

Related Questions

In file main.cpp... #include pqueue.h struct nodeT; struct coordT { double x, y; };
#include <iostream> using namespace std; int main() { double u = 0; double w
#include<iostream> class name { public: int a; name():a(0){}; }; void add(name * pname) {
#include <stdio.h> typedef struct node { int i; struct node *next; }node; node getnode(int
#include<stdio.h> #include<stdlib.h> #define MAX 1000 struct island{ double left; //gobal double right; } island[MAX];
#include <iostream> #include <string> class c1 { public: static std::string m1; static unsigned int
#include <iostream> #include <string.h> using namespace std; int main() { char firstname[] = Alfred;
#include <iostream> #include <string> #include <unordered_map> using namespace std; int main() { unordered_map< int,
#include <stdio.h> typedef struct _octet { char tft_op:3; char e_bit:1; char no_of_pkt:4; }octet_t; int
#include <iostream> #include <iomanip> using namespace std; double distance(double, double); int main () {

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.