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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:46:25+00:00 2026-06-06T13:46:25+00:00

I have read the other threads regarding this same problem but I still don’t

  • 0

I have read the other threads regarding this same problem but I still don’t know why I am getting the following error: undefinded reference to and lists every method in the outer class.

class ClientConnection
{

public:

   class Connector

   {

   public:

         Connector(ClientConnection&);
         ~Connector();

        void Connect(unsigned int usleep);
        void Stop();
        bool isConnected();

    private:

        void attempt();

        ClientConnection& m_client;
        unsigned int m_usleep;
        bool m_stopRequest;
        bool m_isBusy;
        boost::shared_ptr<boost::thread> m_thread;

  };

  Connector* Connector();

  bool connect();
  bool isConnected();

private:

 friend class Connector;
};

I have a reference to the outer class. The Connector method news up a Connector object and passes it a references to itself. But everywhere in code where I get an undefined reference to ClientConnection::connect and undefined reference to ClientConnection::isConnected.

I am completely stuck.

ALSO – when I use Connector() to new up an object, ClientConnection::Connector* connector = client.Connector(); where client is an solid object of ClientConnection, I get invalid use of non-static member function ‘ClientConnection::Connector* ClientConnection::Connector()’

  • 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-06T13:46:27+00:00Added an answer on June 6, 2026 at 1:46 pm

    A few things to consider:

    1. Connector* Connector(); – what are you trying to do here? If you’re trying to declare a pointer to a connector, do Connector* ptr_connector; or something. You’re basically invoking a constructor, declaring a pointer, and giving neither a variable name – it’s crazy!

    2. Did you actually implement the functions were seeing in the nested class, if not that’s where your problem is! Also, did you implement them correctly for a nested class? The syntax is a little different if you’re not implementing them inline in the class.

    3. ClientConnection::Connector* connector = client.Connector(); – This doesn’t work either. you declared an explicit constructor in your class requiring a client connection object. But here, you’re trying to create a connector without passing any client object. You don’t have a constructor for Connector taking no parameters.

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

Sidebar

Related Questions

I have read other related question but i cant really get them to relate
I have read this article from High Scalability about Stack Overflow and other large
I have read that you can do it, but would this really improve performance
I have read this question but it's not quite what I was looking for.
I have been reading other questions and answers around this but I am not
I'm trying to implement BigInt and have read some threads and articles regarding it,
I have read the other posts, e.g., vim: Executing a list of editor commands
Okay guys, I have read through all the other posts and question on jQuery
I read up someplace, that there are characters other than A-Z that have a
I have read multiple articles about why singletons are bad. I know it has

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.