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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:53:21+00:00 2026-05-26T18:53:21+00:00

Somehting about how I initialize my private class memebers. The warning messages do not

  • 0

Somehting about how I initialize my private class memebers. The warning messages do not makes sense…I tried to see if they were concatenated..but they do’t appear to be..this is what Eclipse is saying. Sorry I can’t format it much better.

Here are the compiler message:

Description                               Resource  Path    Location    Type
'sl_list<int>::node_1* sl_list<int>::head'  test_a      line 13 C/C++ Problem
when initialized here                       test_a      line 18 C/C++ Problem
'sl_list<int>::count' will be initialized   test_a      line 14 C/C++ Problem

Relevant Code – call to linked_list

#include "c_include_list.cpp"
#include "c_linked_list.cpp"

using namespace std;

int main() {
    cout << "sl_list" << endl;
    sl_list<int> sl_list_object;
}

Relevant Code – linked_list implmentation

template <class T1> class sl_list
  {
  private:

      class node_1 
      {
      public:     
        T1 data; 
        node_1 *next;
        node_1(T1 data, node_1 *next = NULL) : data(data), next(next) {}        
      };

    node_1 *head;  // line 13
      int count; // line 14

  public:

    sl_list() : count(0), head(NULL){} // line 18
  • 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-26T18:53:22+00:00Added an answer on May 26, 2026 at 6:53 pm

    The answer is pretty simple: Initialize members in the order of declaration.

    sl_list() : head(NULL), count(0){}
    

    By default, this is only a warning, so Eclipse probably gave the -Wall and -Werror flags to the compiler.

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

Sidebar

Related Questions

I remember something about not changing the keys in a for my $key (
I'm a student in Java class and learned something about Java today that made
I have a question about Ruby blocks. For example I have a Ruby Class:
I ran into this example about inheritances on the web, and I am not
I have a class that looks similar to this, and findbugz is complaining about
I'm working with a class for which the new operator has been made private,
I know something about Java but completely new to Enterprise Java. I'm trying my
I saw something about needing to have the assembly available for the type of
I seem to recall something about avoiding the Immediate If operator ( ?: )
I've noticed something about my coding that is slightly undefined. Say we have a

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.