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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:08:36+00:00 2026-06-08T12:08:36+00:00

My error gridlist.h: In constructor ‘GridList::GridList(WINDOW*, int, int, int, int, int)’: gridlist.h:11:47: error: no

  • 0

My error

gridlist.h: In constructor ‘GridList::GridList(WINDOW*, int, int, int, int, int)’:
gridlist.h:11:47: error: no matching function for call to ‘Window::Window()’
gridlist.h:11:47: note: candidates are:
window.h:13:3: note: Window::Window(WINDOW*, int, int, int, int, int)

My code

GridList(WINDOW *parent = stdscr, int colors = MAG_WHITE, int height = GRIDLIST_HEIGHT, int width = GRIDLIST_WIDTH, int y = 0, int x = 0) 
: Window(parent, colors, height, width, y, x) {
    this->m_buttonCount = -1;
    m_maxButtonsPerRow = ((GRIDLIST_WIDTH)/(BUTTON_WIDTH+BUTTON_SPACE_BETWEEN));
    this->m_buttons = new Button *[50];
    refresh();
}

I am a little unsure of what exactly it is trying to tell me and what I am doing wrong. I am passing the correct variable types to the class and the correct number of parameters. However it says I am trying to call Window::Window() with no parameters. Thanks in advance for any help.

The class Button compiles just fine, and is almost exactly the same.

Button(WINDOW *parent = 0, int colors = STD_SCR, int height = BUTTON_WIDTH, int width = BUTTON_HEIGHT, int y = 0, int x = 0) 
: Window(parent, colors, height, width, y, x) {
            this->refresh();
        }
  • 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-08T12:08:38+00:00Added an answer on June 8, 2026 at 12:08 pm

    Your GridList class has a member variable of type Window. Since all members are (default if unspecified) initialized before the body of the constructor, yours looks similar to this in reality:

    GridList::GridList (...)
     : Window(...), m_tendMenu() //<--here's the problem you can't see
    

    Your member variable is being default initialized, but your Window class has no default constructor, hence the problem. To fix it, initialize your member variable in your member initializers:

    GridList::GridList (...)
     : Window(...), m_tendMenu(more ...), //other members would be good here, too
    

    The reason your Button class works is because it doesn’t have a member of type Window, and thus, nothing being default-initialized when it can’t be.

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

Sidebar

Related Questions

Error: ReferenceError: setDynaTreeCustom is not defined add.js Code: ...... success: function(treeData){ try{ showPopup(Add Fields|,'multi_list','event',0,0,1);
Error: Fatal error: Call to a member function bind_param() on a non-object in /var/www/web55/web/pdftest/events.php
Error display as Incorrect syntax near '@Cmp_DocPath', if i use comment Line code I
Error code: Timeout Expired. The timeout period elapsed prior to completion of the operation
error CS0266: Cannot implicitly convert type 'object' to 'int'. An explicit conversion exists (are
error LNK2019: unresolved external symbol char * __cdecl BytesToString(unsigned char const *,unsigned int) (?BytesToString@@YAPADPBEI@Z)
Error: Type mismatch: cannot convert from Set<ConstraintViolation<capture#1-of ?>> to Set<ConstraintViolation<Class<?>>> My code: public class
Error: uncaught exception: [Exception... Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage] nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
Error occurs on this line: xPoint is Int32 randomsize is int xPoint = pictureBox1.Width
error msg: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. code: strSQL =

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.